►Laravel 9 Tutorial from the beginning:- https://www.youtube.com/playlist?list=PLLUtELdNs2ZYTlQ97V1Tl8mirS3qXHNFZ
In Part-148 of the Laravel 9 Tutorial to create a Multi-Vendor E-commerce Website in Laravel 9, we are going to create order logs/history in which we will save order statuses updated by the client from time to time like "In Process", "Shipped", "Delivered" etc.
In this video, we will create an orders_logs table with migration and will create a model for orders logs.
We will update the order logs table every time when we update the order status from the admin panel.
1) Create orders_logs table :-
First of all, we will create an orders_logs table with migration. Create migration file with name create_orders_logs_table for creating orders_logs table with below columns:-
id, order_id, order_status, created_at, updated_at
So, we will run the below artisan command to create a migration file for orders_logs:-
php artisan make:migration create_orders_logs_table
Open the create_orders_logs_table migration file and add all required columns mentioned earlier.
Now, we will run below artisan command to create an orders_logs table with the required columns:-
php artisan migrate
Now orders_logs table has been created with all the required columns.
2) Create OrdersLog model :-
Create an OrdersLog model by running the below command:-
php artisan make:model OrdersLog
3) Update updateOrderStatus function :-
Now we will update updateOrderStatus function to maintain a record of order status with date/time in the orders_logs table.
4) Include Header Statement:-
Include the OrdersLog model at top of OrdersController:-
use App\Models\OrdersLog;
5) Update orderDetails function :-
Update orderDetails function to get order logs for the particular order and return to the order_details.blade.php file.
6) Update order_details.blade.php file :-
Now we will update order_details.blade.php file to show all order logs/status with date/time.
In the next video, we will work on Courier Name and Tracking Number for the shipped orders.
►Laravel 9 Tutorial Playlist (Create Multi-Vendor E-commerce Website) - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYTlQ97V1Tl8mirS3qXHNFZ
►Click here to subscribe for Laravel & other updates - https://www.youtube.com/stackdevelopers
Popular Stack Developers Series that can help you:-
►React JS Tutorial for Beginners with Laravel 9 - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYnEIWliBpU98gtorNRNHw1
►Laravel Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZaHaFmydqjcQ-YyeQ19Cd6u
►GIT Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZVQ-dLOMFWvmCCduzJ8c6R
►Laravel API Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbcCsd4yAAiBU2L3ROREk8P
►Laravel Interview Questions - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbzB_1Jdp_yFcORwOfWP8RU
►jQuery Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbMYoUA46GIonOH29KcjtxA
►Laravel Basic E-commerce Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZY5drPxIWzpq5crhantlzp7
►Laravel Dating Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZrPUnxjlomErJfNvkyS6Hf
►Join this channel to get the complete source code of all series:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - http://facebook.com/stackdevelopers2/
►Join Facebook Group to resolve your queries - http://facebook.com/groups/stackdevelopers
►Follow on Instagram - https://www.instagram.com/stackdevelopers2/
►Follow on GitHub - https://github.com/stackdevelopers
#laravel9 #laravel9tutorial #laravel
In Part-148 of the Laravel 9 Tutorial to create a Multi-Vendor E-commerce Website in Laravel 9, we are going to create order logs/history in which we will save order statuses updated by the client from time to time like "In Process", "Shipped", "Delivered" etc.
In this video, we will create an orders_logs table with migration and will create a model for orders logs.
We will update the order logs table every time when we update the order status from the admin panel.
1) Create orders_logs table :-
First of all, we will create an orders_logs table with migration. Create migration file with name create_orders_logs_table for creating orders_logs table with below columns:-
id, order_id, order_status, created_at, updated_at
So, we will run the below artisan command to create a migration file for orders_logs:-
php artisan make:migration create_orders_logs_table
Open the create_orders_logs_table migration file and add all required columns mentioned earlier.
Now, we will run below artisan command to create an orders_logs table with the required columns:-
php artisan migrate
Now orders_logs table has been created with all the required columns.
2) Create OrdersLog model :-
Create an OrdersLog model by running the below command:-
php artisan make:model OrdersLog
3) Update updateOrderStatus function :-
Now we will update updateOrderStatus function to maintain a record of order status with date/time in the orders_logs table.
4) Include Header Statement:-
Include the OrdersLog model at top of OrdersController:-
use App\Models\OrdersLog;
5) Update orderDetails function :-
Update orderDetails function to get order logs for the particular order and return to the order_details.blade.php file.
6) Update order_details.blade.php file :-
Now we will update order_details.blade.php file to show all order logs/status with date/time.
In the next video, we will work on Courier Name and Tracking Number for the shipped orders.
►Laravel 9 Tutorial Playlist (Create Multi-Vendor E-commerce Website) - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYTlQ97V1Tl8mirS3qXHNFZ
►Click here to subscribe for Laravel & other updates - https://www.youtube.com/stackdevelopers
Popular Stack Developers Series that can help you:-
►React JS Tutorial for Beginners with Laravel 9 - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYnEIWliBpU98gtorNRNHw1
►Laravel Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZaHaFmydqjcQ-YyeQ19Cd6u
►GIT Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZVQ-dLOMFWvmCCduzJ8c6R
►Laravel API Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbcCsd4yAAiBU2L3ROREk8P
►Laravel Interview Questions - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbzB_1Jdp_yFcORwOfWP8RU
►jQuery Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbMYoUA46GIonOH29KcjtxA
►Laravel Basic E-commerce Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZY5drPxIWzpq5crhantlzp7
►Laravel Dating Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZrPUnxjlomErJfNvkyS6Hf
►Join this channel to get the complete source code of all series:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - http://facebook.com/stackdevelopers2/
►Join Facebook Group to resolve your queries - http://facebook.com/groups/stackdevelopers
►Follow on Instagram - https://www.instagram.com/stackdevelopers2/
►Follow on GitHub - https://github.com/stackdevelopers
#laravel9 #laravel9tutorial #laravel
- Catégories
- E commerce Wordpress
- Mots-clés
- laravel 9, laravel9, laravel 9 tutorial
Commentaires