Closed ajaybhargav closed 3 years ago
any update on this?
Ok issue is resolved, if anyone else also facing the same issue; please make sure you need to add web + any other middleware you want to use with admin panel.
E.g. in my case it will be
'middleware' => ['web', 'role:admin'],
I think web should be a default for admin panel.
Describe the bug I have configured middleware option in laratrust panel as
'middleware' => ['role:admin'],
But I always get 403 forbidden error for user assigned as admin. I even tried a simpler middleware setup as 'auth', I am always redirected to login page, but since the user is already logged in i again get redirected to dashboard. I am not sure what is wrong. I tried almost everything clearing cache, views, config etc.
To Reproduce Steps to reproduce the behavior:
set middleware option in config/laratrust.php
panel->middleware->'role:admin'