From a4635dd2a706c87fa688da15427d8cad0ad7073e Mon Sep 17 00:00:00 2001
From: Thibault Debatty <thibault.debatty@gmail.com>
Date: Tue, 26 Dec 2023 12:06:58 +0100
Subject: [PATCH] add APP_ALLOW_REGISTRATION configuration directive

---
 config/app.php | 2 ++
 routes/web.php | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/config/app.php b/config/app.php
index 888d806..7882c3c 100644
--- a/config/app.php
+++ b/config/app.php
@@ -14,6 +14,8 @@ return [
     */
 
     'name' => env('APP_NAME', 'Monitoring'),
+    
+    'allow_registration' => env("APP_ALLOW_REGISTRATION", true),
 
     'proxy' => env('PROXY', null),
 
diff --git a/routes/web.php b/routes/web.php
index 56bb0b1..7a3a514 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -24,7 +24,7 @@ Route::get('/', function () {
     return view('index');
 });
 
-Auth::routes();
+Auth::routes(['register' => config("app.allow_registration")]);
 
 Route::get("home", function () {
     return redirect(action("OrganizationController@index"));
-- 
GitLab