Reputation: 1
I would like some help with seeding my database, using Laravel Forge. I've carried out the deployment for my application and it was successful. The tables were created, as my latest deployment log shows:
From github.com:nahin14/cin-app * branch master -> FETCH_HEAD Already up-to-date. Loading composer repositories with package information Installing dependencies from lock file Nothing to install or update Generating autoload files Generating optimized class loader Compiling common classes Migrated: 2014_10_11_000000_create_roles_table Migrated: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_100000_create_password_resets_table Migrated: 2015_04_16_205049_create_statuses_table Migrated: 2015_04_16_205103_create_claim_types_table Migrated: 2015_04_16_205118_create_insurance_types_table Migrated: 2015_04_16_205127_create_insurers_table Migrated: 2015_04_16_205215_create_solicitors_table Migrated: 2015_04_16_205224_create_client_types_table Migrated: 2015_04_16_205229_create_clients_table Migrated: 2015_04_16_205243_create_vehicle_types_table Migrated: 2015_04_16_205251_create_vehicles_table Migrated: 2015_04_16_205312_create_claims_table Migrated: 2015_04_16_205318_create_tasks_table
However i would like to know how i can seed the tables. I have a databaseseeder.php file set up with all the seeding information. So, how would i go about seeding the tables with the seeding information from the databaseseeder.php file.
Thank you.
Upvotes: 0
Views: 2975
Reputation: 1
php artisan db:seed --force
worked on forge
You can do that from forge -> Commands
Note : The following didn't work on forge:
php artisan db:seed
or
php artisan db:seed --class=UsersTableSeeder
Upvotes: 0
Reputation: 4001
There is a force for production, similar as on the migrate command:
php artisan db:seed --force
But for shure, take care with this...
You can look at the options of every artisan command with the help command, ex
php artisan help db:seed
Upvotes: 6
Reputation: 1
Make sure the value for APP_ENV in your environment settings (.env file) is set to something other than production - staging, local, etc ...
You can navigate to this by going to Sites->Your Site->Environment->Edit Environment.
For the deploy script:
php artisan db:seed --class=TheOneSeeder
Worked for me.
Upvotes: 0
Reputation: 10517
php artisan db:seed
or
php artisan db:seed --class="TheOneSeeder"
Upvotes: 0