Laravel 10 Tutorial #40 | Categories Module (VII) | Add/Manage Multiple Category Levels

Опубликовано: 29 Январь 2025
на канале: Stack Developers
3,043
31

►Laravel 10 Tutorial Playlist:    • Laravel 10 Tutorial: Make Admin Panel...  

In Part-40 of the Laravel 10 Tutorial, we will add Category Levels to Add Category form so that we can add categories under different category levels.

Work for One Category Level:

1) Create getcategories function :-
First of all, we will create getcategories function at Category model and will work for one category level in which we will get Parent Categories and their Sub Categories in select box.

2) Create subcategories Relation :-
We will create hasMany relation between Category and their Sub Categories.

3) Update addEditCategory function :-
Now we will update addEditCategory function at CategoryController to fetch all categories and return to add/edit category blade file.

4) Update add_edit_category.blade.php file :-
Now we will update add_edit_category.blade.php file to show Category Level select box in which we will show Categories and their Sub Categories

Work for Multiple Category Level:

5) Update getcategories function :-
Now, we will update getcategories function at Category model and will work for multiple category level in which we will get Parent Categories, their Sub Categories and their Sub Sub Categories in select box.

6) Update add_edit_category.blade.php file :-
Now we will update add_edit_category.blade.php file to show multiple level catgories in select box.

►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