►Laravel 10 Tutorial Playlist: • Laravel 10 Tutorial: Make Admin Panel...
In Part-17, we will continue working on CRUD Operations for CMS Pages. In this video, we will display cms pages in admin panel. For that we will create Resource Controller with all CRUD Operations.
1) Create Resource CmsController :-
First of all, we will create Resource CmsController under app/Http/Controllers/Admin folder that will automatically create default methods for CRUD operations.
Create CmsController by running below artisan command :-
php artisan make:controller Admin/CmsController --resource --model=CmsPage
2) Create Route :-
Create GET route in web.php file in admin middleware group prefixed with admin and having namespace Admin for displaying cms pages in admin panel :-
// CMS Pages
Route::get('cms-pages','CmsController@index');
3) Update index function :-
Now update index function in CmsController to write query to display all the cms pages in admin panel and return to cms_pages.blade.php file that we will create under /resources/views/admin/pages/ folder.
4) Create cms_pages.blade.php file :-
Now create cms_pages.blade.php file under /resources/views/admin/pages/ folder in which we will add content from LTE admin template data.html file located at folder /pages/tables/data.html and will display cms pages within foreach loop.
5) Update layout.blade.php file :-
Now update layout.blade.php file to add DataTable jQuery script for cms pages to display the cms pages in datatable.
6) Update sidebar.blade.php file :-
Update Admin sidebar to add CMS Pages tab in which we will display "View CMS Pages" link and will highlight it when CMS Pages module selected.
7) Update index function :-
Update index function once again to add session variable for pages with value cmspages and add "Use Session" at top of CmsController.
Now you can check in video; we able to display cms pages in admin panel.
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
Watch video Laravel 10 Tutorial #17 | Laravel CRUD | Manage CMS Dynamic Pages (II) | Create Resource Controller 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 2,731 once and liked it 33 people.