►Laravel 10 Tutorial Playlist: • Laravel 10 Tutorial: Make Admin Panel...
In Part-18, we will continue working on Laravel 10 CRUD Operations for CMS Pages. In this video, we will work on active/inactive status for the cms pages. We can make any CMS Page active or inactive instantly from admin panel via Ajax.
Active status will have 1 value and Inactive status will have 0 value in cms_pages table.
1) Update cms_pages.blade.php file :-
Add id, class and page_id attributes for Active and Inactive status for cms_pages at cms_pages.blade.php file that are required to update the status with jquery and ajax.
2) Update custom.js file :-
Add updateCmsPageStatus jquery function in custom.js file in which we will pass status and page_id that we will return to ajax via admin/update-cms-page-status route.
3) Create Route :-
Now we will create below Post route in admin middleware group in web.php file for updating status that we pass via ajax in last step.
Route::post('update-cms-page-status','CmsController@update');
4) Update "update" function :-
Now we will update "update" function in CmsController to update the status of cms page in cms_pages table and return back the updated status to ajax via json.
5) Update custom.js file :-
Update custom.js file again to get the status and page id in ajax response and update status in cms_pages.blade.php file.
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.
Now you can check in video; we able to display cms pages with active/inactive status.
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 #18 | Laravel CRUD | Manage CMS Pages (III) | Active/Inactive Status for Pages 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,576 once and liked it 36 people.