Having a difficult time getting Route::has working correct.
routes.php
Route::get('login', function() {
return view('login');
});
View has
@if (Route::has('login'))
<div class="top-right links">
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
</div>
@endif
I would assume with the route login created it would show the above links. It just does not show. I must be missing something..
You have to create a name for your routes
Route::get('login', function() {
// code here
})->name('login');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community