Can you show that dashboard link? Most likely that is the issue
Routing issue when user ID is in URL...
Hi All
I'm just working on the user profile page and i have a weird issue that i can't figure out.
When i select the user profile page, the page loads and gives me the URL of eg... ...dealer-profile/2
However when i click to navigate to another page...say dashboard, it tries to add the URL of the existing URL so it ends up as dealer-profile/2dashboard
The way i've got it set up is Navbar:
<a class="nav-link" href="{{ route('dealer-profile.show', Auth::user()->id) }}">
<i class="fas fa-user-cog" aria-hidden="true"></i>
<span>Profile</span>
</a>
& my route is:
Route::get('dealer-profile/{id}', 'Dealer\ProfileController@show')->name('dealer-profile.show');
I tried adding a / after {id} but no joy.
Please can someone advise how i would go about resolving this?
Thank you in advance.
You need to either use a named route (like your dealer-profile) or add a slash in front of dashboard
<a class="nav-link" href="/dealer-dashboard">.
Please or to participate in this conversation.