I’m trying to make authentication for both the User and Admin from the same login view and within the same controller
the authentication is successfully done until the store method redirects the user to the route then the route checks the middleware and returns “False” or redirects the user back to the login page
Note in Laravel version 11 there is no kernel.php instead, it uses bootstrap/app.php[[[enter image description here](https://i.sstatic.net/A21mdbc8.png)](https://i.sstatic.net/4ai89rwL.png)](https://i.sstatic.net/A22jG4T8.png)
I read a lot about declaring or configuring the middleware in the new version until I added it in the app.php but the user still when trying to access the middleware it’s returns false, the user is authenticated when I print the result in the store method it returns true but when it reaches the route then middleware it returns false
Assem Mohsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1