我想要一些帮助在我的数据库种子,使用Laravel Forge。我已经为我的应用程序执行了部署,并且成功了。表已经创建,正如我最新的部署日志所示:
来自github.com:nahin14/cin-app *分支主管-> FETCH_HEAD已经更新。使用包信息加载composer存储库从锁文件安装依赖项无需安装或更新生成自动加载文件生成优化的类加载器编译已迁移的常用类:已迁移: 2014_10_12_100000_create_password_resets_table已迁移: 2014_10_11_000000_create_roles_table已迁移: 2015_04_16_205049_create_statuses_table已迁移: 2015_04_16_205103_create_claim_types_table已迁移: 2015_04_16_205118_create_insurance_types_table已迁移: 2015_04_16_205127_create_insurers_table已迁移: 2015_04_16_205215_create_solicitors_table已迁移: 2015_04_16_205224_create_client_types_table已迁移: 2015_04_16_205229_create_clients_table已迁移: 2015_04_16_205243_create_vehicle_types_table已迁移: 2015_04_16_205251_create_vehicles_table已迁移: 2015_04_16_205312_create_claims_table已迁移: 2015_04_16_205318_create_tasks_table
但是,我想知道如何在表格中添加种子。我有一个包含所有种子信息的databaseseeder.php文件。那么,我该如何使用databaseseeder.php文件中的种子信息对表进行种子设定呢?
谢谢。
发布于 2017-02-21 18:49:10
这里有一个用于生产的工具,类似于迁移命令:
php artisan db:seed --force但是对于舒尔,要小心这个……
您可以使用help命令查看每个artisan命令的选项,例如
php artisan help db:seed发布于 2015-05-10 17:20:50
php artisan db:seed
或
php artisan db:seed --class="TheOneSeeder“
https://stackoverflow.com/questions/30142951
复制相似问题