Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть #175

  • Stack Developers
  • 2021-07-08
  • 833
#175
laravel ecommercecreate ecommerce website in laravelcms pages laraveldynamic pages laravellaravel 8 e-commerce websitelaravel cms functionalitylaravel dynamic pages functionalitylaravel pages from admin panellaravel static pages from admin panellaravel web pages from adminmanage pages from admin laravellaravel 8 display cms pagesdisplay cms pages in admin laravelupdate active inactive laravelpage active inactive laraveldisable laravel page
  • ok logo

Скачать #175 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно #175 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку #175 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео #175

In Part-175 of Advance E-commerce series, we will continue working on CMS Pages. In this video, we will display cms pages in admin panel with option of making them active/inactive.

1) Create CmsController :-
First of all, we will create CmsController under app/Http/Controllers/Admin folder.

Create CmsController by running below artisan command :-
php artisan make:controller Admin/CmsController

2) Create Model :-
Create CmsPage model by running below artisan command :-
php artisan make:model CmsPage

3) 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@cmspages');

4) Create cmspages function :-
Now create cmspages 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.

5) Include CmsPage model :-
Include CmsPage model at top of CmsController.
use App\CmsPage;

6) Create cms_pages.blade.php file :-
Now create cms_pages.blade.php file under /resources/views/admin/pages/ folder in which we will display cms pages within foreach loop.

7) Update admin_layout.blade.php file :-
Now update admin_layout.blade.php file to add DataTable jQuery script for cms pages to display the cms pages in datatable.

Now we will work on active/inactive status for the cms pages.

Active status will have 1 value and Inactive status will have 0 value in cms_pages table.

8) 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.

9) Update admin_script.js file :-
Add updateCmsPageStatus jquery function in admin_script.js file in which we will pass status and page_id that we will return to ajax via admin/update-cms-page-status route.

10) 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@updateCmsPageStatus');

11) Update VerifyCsrfToken.php :-
Add route "admin/update-cms-page-status" in VerifyCsrfToken.php file so that CSRF token mismatch error won't come.

12) Create updateCmsPageStatus :-
Now we will create updateCmsPageStatus in CmsController to update the status of cms page in cms_pages table and return back the updated status to ajax via json.

13) Update admin_script.js file :-
Update admin_script.js file again to get the status and page id in ajax response and update status in cms_pages.blade.php file.

14) Update admin_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.

15) Update cmspages function :-
Update cmspages function once again to add session variable for pages with value cmspages and add "Use Session" at top of CmsController.

Session::put('page','cmspages');

Now you can check in video; we able to display cms pages with active/inactive status.

Thanks for watching :)

Join this channel to get complete code/support:
   / @stackdevelopers  

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]