Laravel 9 Tutorial from the beginning:- • Laravel Multi Vendor Tutorial
In Part-16 of the Laravel 9 Tutorial to create a Multi-Vendor E-commerce Website in Laravel, we will start working on vendors settings in which we will add the functionality of updating vendor details.
We are going to get 3 types of Vendor details in our Laravel 9 Multi Vendor E-commerce website:-
1) Personal Details
2) Business/Shop Details
3) Bank Details
For saving personal details of the vendor, we are already having vendors table. But for business/shop and bank details, we are going to create 2 more tables that are vendors_business_details and vendors_bank_details.
vendors_business_details table is going to have below columns:-
shop_name
shop_address
shop_city
shop_state
shop_country
shop_pincode
shop_mobile
shop_website
shop_email
address_proof
address_proof_image
business_license_number
gst_number
pan_number
vendors_bank_details table is going to have below columns:-
account_holder_name
bank_name
account_number
confirm_account_number
bank_ifsc_code
We will create the above tables with Migration commands and add one dummy record with the seeder.
Create vendors_business_details table with Migration:-
1) Run below command :-
php artisan make:migration create_vendors_business_details_table
2) Update create_vendors_business_details_table Migration file
3) Run below command:-
php artisan migrate
Create vendors_bank_details table with Migration
1) Run below command :-
php artisan make:migration create_vendors_bank_details_table
2) Update create_vendors_bank_details_table Migration file
3) Run below command:-
php artisan migrate
We will create a Seeding for vendors table to automatically insert vendor data from a file.
1) Writing Seeder / Create VendorsTableSeeder file :-
First of all, we will generate a seeder and create VendorsTableSeeder file where we will add record for the vendors table.
Run below artisan command to generate Seeder and create VendorsTableSeeder file:-
php artisan make:seeder VendorsTableSeeder
The above command will create VendorsTableSeeder.php file at \database\seeders\
Now open the VendorsTableSeeder file and add a record for a vendor.
2) Update DatabaseSeeder.php file:-
Now update DatabaseSeeder.php file located at database/seeders/ to add VendorsTableSeeder class as shown in the video.
3) Running Seeder / Run below command:-
Once you have written your seeder, you may need to regenerate Composer's autoloader using the dump-autoload command:
composer dump-autoload
4) Run below command:-
Now run the last command that will finally insert vendor record into vendors table.
php artisan db:seed
You can see in the video; we are able to generate record for vendors table.
Now we will also insert a vendor record in the admins table with seeder and finally log into the admin panel with vendor credentials.
In next video, we are going to insert records in vendors_bank_details table and vendors_business_details table and will work on vendors module in admin panel for updating vendor details.
►Laravel 9 Tutorial (Create Multi-Vendor E-commerce Website) - • Laravel Multi Vendor Tutorial
►Get Ready for Laravel 9 - • Learning Laravel 9
►Click here to subscribe for Laravel & other updates - / stackdevelopers
Popular Stack Developers Series that can help you:-
►Laravel Tutorial for Beginners - • Laravel Tutorial for Beginners | Adva...
►GIT Tutorial for Beginners - • Git Tutorial for Beginners | Create y...
►Laravel API Tutorial - • Laravel API Tutorial | Create API fro...
►Laravel Interview Questions - • Laravel Interview Questions & Answers...
►jQuery Tutorial - • jQuery Tutorial
►Laravel Basic E-commerce Series - • Make Admin Panel / E-commerce Website...
►Laravel Dating Series - • Make Dating / Social Networking Websi...
►Join this channel to get the complete source code of all series:
/ @stackdevelopers
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - / stackdevelopers2
►Join Facebook Group to resolve your queries - / stackdevelopers
►Follow on Instagram - / stackdevelopers2
►Follow on GitHub - https://github.com/stackdevelopers
#laravel9 #laravel9tutorial #laravel
Смотрите видео Laravel 9 Tutorial #16 | Create Laravel 9 Multi Vendor Ecommerce Website | Update Vendor Details (I) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Stack Developers 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,41 раз и оно понравилось 7 людям.