Can you show the code of your checkrole middleware? And why do you have a middleware for that? You can just create gates like this for example: https://laravel.com/docs/9.x/authorization#gate-responses
Feb 21, 2022
3
Level 1
Laravel Login Issue
I have added multiple roles for users with new table as roles and user role id in user table. Then added as checkrole middleware but once you logged in as admin (role id 1) then it will logged in success fully.
But on next you try to logged in as user (role id 2) it will redirect to login page again.
Please or to participate in this conversation.