#7 Make E-commerce website in Laravel 5.6 | #18 Admin Panel | Add Product | Validations
Previous Video | Ecom Part 6: https://youtu.be/reumQcj7jvU
In Part 7, we are going to add product in products table by submitting add product form. We will also add validations to our add product form. Also we are going to display products Add/Edit links in sidebar.
1) Add in Sidebar :-
First of all, we will add Add/Edit product links in admin sidebar in the same way like we did for categories earlier on.
Open admin_sidebar.php file and make changes in it to add Add/Edit product links.
2) Add Validations :-
Now we will add validations to our add product form.
Open matrix.form_validations.js file and add validations for form id add_product in the same way like we did for add_category form in earlier videos.
3) Update addProduct function :-
Now we will update addProduct function for getting all data from product form and save them into products table.
For optional fields, only add if the field is not empty otherwise just assign empty value to it like we have done for description.
See our products are coming fine now in products table.
In next video, we will save images as well; we will save image name in products table and actual image in products folder that we will create in public/images folder. And then we are going to show all products in view products page in admin panel.. So stay tune for next video..,
Thanks for watching :)
Next Video | Ecom Part 8: https://youtu.be/xtBG62Ct-hc
Видео #7 Make E-commerce website in Laravel 5.6 | #18 Admin Panel | Add Product | Validations канала Stack Developers
In Part 7, we are going to add product in products table by submitting add product form. We will also add validations to our add product form. Also we are going to display products Add/Edit links in sidebar.
1) Add in Sidebar :-
First of all, we will add Add/Edit product links in admin sidebar in the same way like we did for categories earlier on.
Open admin_sidebar.php file and make changes in it to add Add/Edit product links.
2) Add Validations :-
Now we will add validations to our add product form.
Open matrix.form_validations.js file and add validations for form id add_product in the same way like we did for add_category form in earlier videos.
3) Update addProduct function :-
Now we will update addProduct function for getting all data from product form and save them into products table.
For optional fields, only add if the field is not empty otherwise just assign empty value to it like we have done for description.
See our products are coming fine now in products table.
In next video, we will save images as well; we will save image name in products table and actual image in products folder that we will create in public/images folder. And then we are going to show all products in view products page in admin panel.. So stay tune for next video..,
Thanks for watching :)
Next Video | Ecom Part 8: https://youtu.be/xtBG62Ct-hc
Видео #7 Make E-commerce website in Laravel 5.6 | #18 Admin Panel | Add Product | Validations канала Stack Developers
Комментарии отсутствуют
Информация о видео
1 апреля 2018 г. 18:07:39
00:30:00
Другие видео канала