I’m encountering an issue with my Laravel project’s authentication system. Upon logging in, I’d like users to be redirected to different views depending on their role. However, I’m facing a problem where the same view is being called by two different controllers simultaneously. Specifically, the ListeUser view is being called by both the AuthController and another controller.
The problem arises because both the AuthController and another controller are calling the ListeUser view, resulting in a conflict.
How can I resolve this issue and ensure that the correct view is called based on the user’s role, without conflicts between controllers?
I attempted to redirect the user to a page based on their role, but encountered issues with undefined variables.
I attempted to redirect the user to a page based on their role, but encountered issues with undefined variables.