I am facing this error when I tried to redirect my page from main dashboard to the view profile page. I'm using Laravel 5.8 and below is my code:
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{{Route::redirect('/admin.dashboard', '/view profile')}}">View profile</a>
<a class="dropdown-item" href="#">Setting</a>
</div>
Can anyone tell me where I'm going wrong?
hrefto go?Route::redirect()is not the correct thing to use there, should beurl()orroute(), but I'm not sure where you want to go.Route::get('/view profile', ...);is not valid... You can't have spaces in a URL.Route::get('/view-profile, ...);` is valid, in which case you'd use{{ url('/view-profile') }}