fix: registration/login button
fix: init user registrations
This commit is contained in:
@@ -52,6 +52,11 @@ class FortifyServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
Fortify::loginView(function () {
|
Fortify::loginView(function () {
|
||||||
$settings = InstanceSettings::get();
|
$settings = InstanceSettings::get();
|
||||||
|
$users = User::count();
|
||||||
|
if ($users == 0) {
|
||||||
|
// If there are no users, redirect to registration
|
||||||
|
return redirect()->route('register');
|
||||||
|
}
|
||||||
return view('auth.login', [
|
return view('auth.login', [
|
||||||
'is_registration_enabled' => $settings->is_registration_enabled
|
'is_registration_enabled' => $settings->is_registration_enabled
|
||||||
]);
|
]);
|
||||||
|
@@ -97,7 +97,7 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bg-coollabs-gradient {
|
.bg-coollabs-gradient {
|
||||||
@apply text-transparent bg-clip-text bg-gradient-to-r from-purple-500 via-pink-500 to-red-500;
|
@apply text-transparent text-white bg-gradient-to-r from-purple-500 via-pink-500 to-red-500;
|
||||||
}
|
}
|
||||||
.text-helper {
|
.text-helper {
|
||||||
@apply inline-block font-bold text-warning;
|
@apply inline-block font-bold text-warning;
|
||||||
|
@@ -8,8 +8,7 @@
|
|||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<h1>{{ __('auth.login') }}</h1>
|
<h1>{{ __('auth.login') }}</h1>
|
||||||
@if ($is_registration_enabled)
|
@if ($is_registration_enabled)
|
||||||
<a href="/register"
|
<a href="/register" class="text-xs normal-case hover:no-underline btn btn-sm bg-coollabs-gradient">
|
||||||
class="text-xs text-center text-white normal-case bg-transparent border-none rounded no-animation hover:no-underline btn btn-sm bg-coollabs-gradient">
|
|
||||||
{{ __('auth.register_now') }}
|
{{ __('auth.register_now') }}
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
|
Reference in New Issue
Block a user