Reputation: 57
I'm new to laravel..currently learning to use the auth middleware. can someone walk me through the code..with emphasis on this line
@if (Route::has('register'))
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
</li>
@endif
the rest of the code under app.blade.php code under layout folder is below
Upvotes: 0
Views: 585
Reputation: 301
First Welcome to laravel .. Learning laravel will make you learn a lot of the modern web development techniques as you go through it.
about the code it's a check that determines whether your app's router has a route named register or not ..
by default this route will not be register .. but after you run this command
php artisan make:auth
laravel will register it for you by adding Auth::routes()
to routes/web.php
Upvotes: 1