►Laravel 10 Tutorial Playlist: • Laravel 10 Tutorial: Make Admin Panel...
In Part-35 of the Laravel 10 Tutorial, we will continue working on the Categories module. In this video, we will display categories in the admin panel in Datatable and will also work on enable/disable functionality and delete functionality.
1) Create Route:-
Create GET route in web.php file in admin middleware group prefixed with admin and having namespace Admin for displaying categories in admin panel:-
Route::get('categories','CategoryController@categories');
2) Create categories function:-
Now create categories function in CategoryController to write query to display all the categories in admin panel and return to categories blade file that we will create under /resources/views/admin/categories/ folder.
3) Include Category model:-
Include the Category model at top of CategoryController.
use App\Models\Category;
4) Create parentcategory Relation:-
We will create parentcategory hasOne Relation to find the parent category of every category if there is any to display along with the category name in the categories module in admin panel.
5) Update categories function:-
Now we will update categories function to attach parentcategory Relation to show the parent category of every category if there is any to display along with the category name in the categories module in admin panel.
6) Create categories.blade.php file:-
Now create the categories.blade.php file under /resources/views/admin/categories/ folder in which we will add content from the Skydash admin template and will display categories within foreach loop.
7) Update layout.blade.php file :-
We will update layout.blade.php file to call datatable for categories
$("#categories").DataTable();
In next video, we will work on the active/inactive status and delete functionality for categories in the admin panel.
►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
Смотрите видео #35 Laravel 10 Tutorial | Categories Module (II) | Display Categories in Admin Panel онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Stack Developers 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,291 раз и оно понравилось 13 людям.