►Laravel 10 Tutorial Playlist: • Laravel 10 Tutorial: Make Admin Panel...
In Part-25, we will start working on Subadmins Roles and Permissions for our Laravel 10 admin panel that can be used for any dynamic website.
We are going to make provision to add subadmins from admin panel with limited or all roles and permissions like we can create user roles for one sub admin and orders roles for another subadmin or even both for some other sub admin and set permissions accordingly. Admin will always have full roles and have all the permissions of the admin panel.
In this video, we are going to show sub-admins in the admin panel from admins table that we have added earlier in the beginning of the series.
First of all, we will add few subadmins in admins table with seeder command by taking below steps :-
1) Update AdminsTableSeeder.php :-
Write query to insert multiple subadmins in admins table
2) Update DatabaseSeeder.php :-
Update DatabaseSeeder.php file to call AdminsTableSeeder class
3) Run Command :-
Run below Seeder Command to update admins table with new subadmins records.
php artisan DB:seed
Now we will show Admins/Sub-Admins
1) Update sidebar.blade.php file :-
Now, update sidebar.blade.php file to show Add/View Sub-Admins links at admin sidebar.
2) Create Route :-
Now create GET Route for displaying subadmins in admin panel.
// Sub-Admins
Route::get('subadmins','AdminController@subadmins');
3) Create subadmins function :-
Now we will create subadmins function in AdminController where we will add query to select all subadmins from admins table to show in subadmins.blade.php file that we will create in our next step.
4) Create subadmins.blade.php file :-
Now create subadmins folder under \resources\views\admin\ and then create subadmins.blade.php file under that subadmins folder.
We will show all subadmins in foreach loop with their name, email, type and status.
In next video, we will work on active/inactive and delete functionality for subadmins.
Thanks for watching :)
►Click here to subscribe for Laravel & other updates - / stackdevelopers
Popular Stack Developers Series that can help you:-
►Laravel Multi-Vendor E-commerce Website - • Laravel Multi Vendor Tutorial
►React JS Tutorial for Beginners with Laravel - • React JS Tutorial with Laravel for Be...
►Laravel Tutorial for Beginners - • Laravel Tutorial for Beginners | Adva...
►GIT Tutorial for Beginners - • Git Tutorial for Beginners | Create y...
►Laravel API Tutorial - • Laravel API Tutorial | Create API fro...
►Laravel Interview Questions - • Laravel Interview Questions & Answers...
►jQuery Tutorial - • jQuery Tutorial
►Laravel Basic E-commerce Series - • Make Admin Panel / E-commerce Website...
►Laravel Dating Series - • Make Dating / Social Networking Websi...
►Join this channel to get the complete source code of all series:
/ @stackdevelopers
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - / stackdevelopers2
►Join Facebook Group to resolve your queries - / stackdevelopers
►Follow on Instagram - / stackdevelopers2
►Follow on GitHub - https://github.com/stackdevelopers
#laravel10 #laravel10tutorial #laravel