I have two user types admin and member. Now, members cannot view other profiles except their own. Only admins have access to all user profiles.
Now my route for the UsersController@show (only accessible by admins) is http://laravel.test/user/username
However if a user accesses that url with his own username, it should grant the request.
This applies to all other functions such as edit and update.
Now I could create another controller designated for the current user only, call it MyController. I could copy the code from the UsersController, just changing a few codes so that it gets the current user from auth(). But I would prefer not to.
Any help?