Skip to content

Commit 6d7c47b

Browse files
jpmorbyJon Morbytaylorotwell
authored
Add check for register route in case registrations have been disabled (#37)
* Add check for register route so if registrations have been disabled the form doesn't die * fixed indentation as requested * Update login.blade.php --------- Co-authored-by: Jon Morby <[email protected]> Co-authored-by: Taylor Otwell <[email protected]>
1 parent 1159d84 commit 6d7c47b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

resources/views/livewire/auth/login.blade.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Illuminate\Auth\Events\Lockout;
44
use Illuminate\Support\Facades\Auth;
55
use Illuminate\Support\Facades\RateLimiter;
6+
use Illuminate\Support\Facades\Route;
67
use Illuminate\Support\Facades\Session;
78
use Illuminate\Support\Str;
89
use Illuminate\Validation\ValidationException;
@@ -117,9 +118,10 @@ protected function throttleKey(): string
117118
<flux:button variant="primary" type="submit" class="w-full">{{ __('Log in') }}</flux:button>
118119
</div>
119120
</form>
120-
121-
<div class="space-x-1 text-center text-sm text-zinc-600 dark:text-zinc-400">
122-
Don't have an account?
123-
<flux:link href="{{ route('register') }}" wire:navigate>Sign up</flux:link>
124-
</div>
121+
@if (Route::has('register'))
122+
<div class="space-x-1 text-center text-sm text-zinc-600 dark:text-zinc-400">
123+
Don't have an account?
124+
<flux:link href="{{ route('register') }}" wire:navigate>Sign up</flux:link>
125+
</div>
126+
@endif
125127
</div>

0 commit comments

Comments
 (0)