Redirect landing to login, add registration toggle

Changes:
- Landing page (/) now redirects to /login
- Added 'Enable User Registration' setting (off by default)
- Created CheckRegistrationEnabled middleware
- Registration routes blocked when setting is disabled
- Admin can toggle registration in Settings > System
This commit is contained in:
2026-03-11 07:43:25 +02:00
parent 4b2ff91ac4
commit cf6079d58c
6 changed files with 44 additions and 5 deletions

View File

@@ -12,7 +12,9 @@
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
$middleware->alias([
'registration.enabled' => \App\Http\Middleware\CheckRegistrationEnabled::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//