2) Create Route :-
Now create GET/POST Route for add/edit delivery address in web.php file like below :-
// Add/Edit Delivery Address
3) Create addEditDeliveryAddress function :-
Now create addEditDeliveryAddress function at ProductsController in which we will also return countries.
4) Create add_edit_delivery_address.blade.php file :-
Now create add_edit_delivery_address.blade.php file at resources/views/products/ path similar to account blade file which we will update further.
5) Update addEditDeliveryAddress function :-
Now update addEditDeliveryAddress function at ProductsController to insert the delivery address with in post method when id is empty.
6) Update checkout.blade.php file :-
Forget success_message session at checkout page after showing the success message. Do same for error message everywhere.
Now we can able to add new delivery addresses for the customer. In next video, we will work on edit/delete functionality for the delivery address as well.
Join this channel to get complete code: