How to give access to the user in a specific page depending on their role using laravel Middleware
MiddleWare in laravel work to check user role and give access to the users depending their role. I am writing this topics because when I was working on laravel user permission based access I faced difficulty and I spend much time for this. So here I will try to describe laravel middleware in a easy way as much as I can.
First let me describe the scenario that I am going to do in this tutorial. So it will be easy to understand.