Hi Everybody,
When using the Jwt-auth, I met the issue: the user logged in using Jwt-auth and then user go to the new route "/abc" this route need to permission (such as admin role) :
Route::get('/abc', 'PagesController@abc');
Because user already loggin, so now how to check user's permission and role for this route? My solution : check permission in "Controller" but it is not good solution.
Please help me the solution for this case.
Thanks.
Use middlware for that if the user authinticated you can check his role .
Hi @engAhmad ,
Can you give me the example?
Thank you
Thank @engAhmad .
Most helpful comment
@cona88
https://scotch.io/tutorials/role-based-authentication-in-laravel-with-jwt