Laravel 9 Tutorial from the beginning:- • Laravel Multi Vendor Tutorial
In Part-27 of the Laravel 9 Tutorial to create a Multi-Vendor E-commerce Website in Laravel, we will continue working on the Sections module. In this video, we will display sections in the admin panel and will also work on enable/disable functionality and will show sections in datatable.
1) Create Route:-
Create GET route in web.php file in admin middleware group prefixed with admin and having namespace Admin for displaying sections in admin panel:-
Route::get('sections','SectionController@sections');
2) Create sections function:-
Now create sections function in SectionController to write query to display all the sections in admin panel and return to sections blade file that we will create under /resources/views/admin/sections/ folder.
3) Include Section model:-
Include Section model at top of SectionController.
use App\Models\Section;
4) Create sections.blade.php file:-
Now create sections.blade.php file under /resources/views/admin/sections/ folder in which we will add content from the Skydash admin template and will display sections within foreach loop.
Now we will work on the active/inactive status for sections in the admin panel.
5) Update sections.blade.php file:-
Add updateSectionStatus class with id and section_id
6) Create Route:-
Create Post route to update status of section in web.php file :-
Route::post('update-section-status','SectionController@updateSectionStatus');
7) Create updateSectionStatus function :-
Create updateSectionStatus function in SectionController to update the section status to active or inactive.
8) Update custom.js file :-
Add jquery function to update active/inactive status for sections.
►Laravel 9 Tutorial (Create Multi-Vendor E-commerce Website) - • Laravel Multi Vendor Tutorial
►Get Ready for Laravel 9 - • Learning Laravel 9
►Click here to subscribe for Laravel & other updates - / stackdevelopers
Popular Stack Developers Series that can help you:-
►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
#laravel9 #laravel9tutorial #laravel