#109 Make E-com Website in Laravel 5.6 / 5.7 | CMS Pages | Add CMS Page Functionality
In Part-109 of E-com Series, we will continue work on CMS Pages and will work on Add CMS Page functionality in admin panel.
1) Create Route :-
First of all, create GET/POST route for add-cms-page in web.php file like below :-
// Add CMS Route
Route::match(['get','post'],'/admin/add-cms-page','CmsController@addCmsPage');
2) Create addCmsPage function :-
Now create addCmsPage function in CmsController file and return view to add_cms_page blade file that we will create.
3) Create add_cms_page.blade.php file :-
Now create pages folder under views folder in which we will create add_cms_page.blade.php file. Add admin design to it and Add CMS Page form. We can copy the entire add product page and make changes.
4) Update addCmsPage function :-
Now we will update addCmsPage function to receive the post data that contains the cms page details and add query to insert the details into cms_pages table.
5) Add Header Statement :-
Add below statement at top of your CmsController file :-
use App\CmsPage;
You can check in video, we able to insert the cms page into cms_pages table and return back to add cms form for now with success message.
In next video, we are going to display all cms pages and will add update cms page functionality as well.
Thanks for watching :)
Видео #109 Make E-com Website in Laravel 5.6 / 5.7 | CMS Pages | Add CMS Page Functionality канала Stack Developers
1) Create Route :-
First of all, create GET/POST route for add-cms-page in web.php file like below :-
// Add CMS Route
Route::match(['get','post'],'/admin/add-cms-page','CmsController@addCmsPage');
2) Create addCmsPage function :-
Now create addCmsPage function in CmsController file and return view to add_cms_page blade file that we will create.
3) Create add_cms_page.blade.php file :-
Now create pages folder under views folder in which we will create add_cms_page.blade.php file. Add admin design to it and Add CMS Page form. We can copy the entire add product page and make changes.
4) Update addCmsPage function :-
Now we will update addCmsPage function to receive the post data that contains the cms page details and add query to insert the details into cms_pages table.
5) Add Header Statement :-
Add below statement at top of your CmsController file :-
use App\CmsPage;
You can check in video, we able to insert the cms page into cms_pages table and return back to add cms form for now with success message.
In next video, we are going to display all cms pages and will add update cms page functionality as well.
Thanks for watching :)
Видео #109 Make E-com Website in Laravel 5.6 / 5.7 | CMS Pages | Add CMS Page Functionality канала Stack Developers
laravel 5.7 cms pages laravel laravel 5.7 add cms page cms pages functionality in laravel cms pages in laravel 5.7 about us page laravel terms and conditions page laravel laravel 5.7 ecom cms page e-com laravel make cms pages in laravel create dynamic pages in laravel create pages dynamically in laravel create pages from admin laravel laravel 5.7 admin pages
Комментарии отсутствуют
Информация о видео
19 февраля 2019 г. 19:28:47
00:16:59
Другие видео канала