seeder
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| seeder [2020/12/23 19:09] – chifek | seeder [2023/09/14 06:06] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 101: | Line 101: | ||
| php artisan db:seed --class=UserSeeder | php artisan db:seed --class=UserSeeder | ||
| </ | </ | ||
| + | |||
| + | You may also seed your database using the `migrate: | ||
| + | |||
| + | < | ||
| + | php artisan migrate: | ||
| + | </ | ||
| + | |||
| + | **Forcing Seeders To Run In Production** | ||
| + | |||
| + | Some seeding operations may cause you to alter or lose data. In order to protect you from running seeding commands against your production database, you will be prompted for confirmation before the seeders are executed in the `production` environment. To force the seeders to run without a prompt, use the `--force` flag: | ||
| + | |||
| + | < | ||
seeder.1608750599.txt.gz · Last modified: 2023/09/14 06:06 (external edit)