bitfumes / laravel-multiauth

Multi Auth and admin auth in Laravel Project
MIT License
470 stars 105 forks source link

How to restrict blade section for multi user #112

Closed ji-tusher closed 4 years ago

ji-tusher commented 4 years ago

How can restrict some section on a blade file for different users? Suppose for admin panel there are super admin, admin, editor, and normal users don't have access to the admin panel. Now there are some menu in the admin dashboard as well as pages. My logic is:

1>Menu 1,2,3 for all users (super admin, admin, editor 2> Menu 4,5,6 for super admin, admin. 3>Menu 7,8 for super admin

So in the dashboard blade file, there are 8 menus and different roles can access these menus. How can I restrict it? Basically I have only three roles. So It can be done by fixed code. If there is something dynamic roles that would be great. Like when super admin create another admin, can give specific menu permission to the admin. Suppose for admin1 will get 9,10,11 menu permission, and admin2 will get only 9,10 menu permission. Something like that.


I am using laravel 7

anantgrafix commented 4 years ago

Please go through documentation before reporting bugs. Kindly close this issue as this is not a bug.