Is it possible to hava two seperate middlewares for frontend and backend in laravel?

Viewed 25

I have a platform created with laravel 5.4.I did the authentification process for the backend and everything is working fine.For my front pages i also to want them to be accessed when the user is only logged (client).Do i have to redirect by role or can i have seperate authentification for each side ?

1 Answers

In general, this is achieved defining some type of roles in your application, sort of user or admin. See official docs regarding authorization.

Also, check this article, as it does exactly what you want in a simple but effective way :)

Related