Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

make a seeding file in laravel

1#create a laravel seeding file
php artisan make:seeder <seeder file name>
#example
php artisan make:seeder ShopSeeder
2#after seeding file create and seed data added,run this command below to add thos data in database
php artisan db:seed --class=<seeder file name>
#example
php artisan db:seed --class=ShopSeeder
3# if want to add all seeder fill data just run
php artisan db:seed
 
PREVIOUS NEXT
Tagged: #seeding #file #laravel
ADD COMMENT
Topic
Name
1+5 =