#156

Published: 01 January 1970
on channel: Stack Developers
923
16

In Part-156 of E-com Series, we will continue working on Admin Roles / Multiple Admins / Sub - Admins. We will give access of admin panel to sub admins as per their roles assigned by admin. Sub Admin will login into the admin panel and going to have limited access.

1) Update Adminlogin.php :-
First of all, update Adminlogin.php model file to get the sub admin details so that we can get the sub admin roles assigned by the admin. And we will put those roles in session to access them every where.

2) Update admin_sidebar.blade.php file :-
We will add conditions in admin_sidebar.blade.php file to check whether the sub admin is having access for the module or not. We will not show Add/View links if no access is there.

3) Update CategoryController.php :-
We will update add/edit/view category functions to check if the sub admin is having access. And if there is no access then we will send sub admin to dashboard with error message.

To be continued...


Watch video #156 online without registration, duration hours minute second in high quality. This video was added by user Stack Developers 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 923 once and liked it 16 people.