#38 Make E-com website in Laravel 5.6 | Edit Product Attributes
Автор: Stack Developers
Загружено: 2018-06-12
Просмотров: 3362
Описание:
Previous Video | Ecom Part 37: • #37 Make E-com website in Laravel 5.6 | Pr...
In Part 38, we are going to work on admin panel once again and this time we will make option to edit our products attributes. We are going to edit Price and Stock in "add attributes" blade file of the admin panel.
1) Update add_attributes.blade.php File :-
First update "add attributes" blade file. We will add form and make price and stock input fields with update button so that we can update them anytime we want.
Also add {{ csrf_field() }} with form.
2) Create Route :-
Create GET/POST route for edit-attributes with id in web.php file:-
3) Create editAttributes function :-
Now create editAttributes function in ProductsController and also pass attribute id as parameter so that we can update the stock and price with id.
Now see in video, we able to update prices and stocks of our products attributes anytime we want and the changes reflect on product detail page as well.
In next video, we will do more in product detail page and then will also start working on shopping cart page.
So stay tune for next video...
Thanks for watching :)
Next Video | Ecom Part 39: • #39 Make E-com website in Laravel 5.6 | Pr...
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: