Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #38

    I am new in Laravel Breeze and I see this code in the welcome.blade.php file.

    @if (Route::has(‘login’))


    What does the code do?


    Route::has(‘login’) basically checks in the routes list if a route with a name ‘login’ exists. If it does it returns true, otherwise it returns false.

    If you check on routes/auth.php you would see this code on the file

    Route::get(‘login’, [AuthenticatedSessionController::class, ‘create’])

    This means with a fresh installation of Laravel Breeze, this named route is made by default so that if statement would return true.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.