I declared resource route like below
Route::resource('{slug}/user','ManageUsersController');
This gives me a route
{slug}/user/{id}
where slug is the slug of a company name and id is the specific id of user.
In view, I declared anchor tag : <a href=user/{!! $user->id!!}
>User</a>
This directs me to the function show
in ManageUserController
public function show($id)
{
return $id;
}
But the return result is the slug
, not the the id of the user. My URL is project/company-name/user/5
Where did i go wrong ? how can i get the user ID in return rather than the slug ?
-thanx