添加部分数据

dev
vine_liutk 2022-12-09 16:34:01 +08:00
parent 05537c035f
commit 39d50c3acc
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,13 @@
# lcly-data-admin
隆昌农业大数据
php artisan k:g
php artisan admin:install
php artisan db:seed AdminSeeder
php artisan db:seed PermissionSeeder
php artisan db:seed AgriculturalBaseSeeder
php artisan db:seed CropSeeder

View File

@ -143,6 +143,13 @@ class CropSeeder extends Seeder
['name'=>'不知火','category_id' => 2, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'耙耙柑','category_id' => 2, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'爱媛','category_id' => 2, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'稻虾','category_id' => 3, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'生猪','category_id' => 4, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'水稻','category_id' => 2, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'活草鱼','category_id' => 3, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'鲈鱼','category_id' => 3, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'乌鱼','category_id' => 3, 'crop_type' => 1, 'unit' => '吨'],
['name'=>'鱼类','category_id' => 3, 'crop_type' => 1, 'unit' => '吨'],
];
DB::table('crops')->truncate();
try {