Laravel Seeder plusieurs colonnes
public function run()
{
$subsubcategory = [
['id' => 6, 'name' => 'Road bicycles', 'sub_category_id' => 13, 'is_published' => 1],
['id' => 7, 'name' => 'Hybrid bicycles','sub_category_id' => 13, 'is_published' => 1],
['id' => 8, 'name' => 'Mountain bicycles', 'sub_category_id' => 13, 'is_published' => 1],
['id' => 9, 'name' => 'Tandem bicycles','sub_category_id' => 13, 'is_published' => 1],
['id' => 10, 'name' => 'Bmx 20','sub_category_id' => 16, 'is_published' => 1],
['id' => 11, 'name' => 'Kids bicycles 24"','sub_category_id' => 12, 'is_published' => 1],
['id' => 13, 'name' => 'Kids bicycle 20"','sub_category_id' => 12, 'is_published' => 1],
['id' => 14, 'name' => 'Kids bicycles 18"','sub_category_id' => 12, 'is_published' => 1],
['id' => 15, 'name' => 'Kids bicycles 16"','sub_category_id' => 12, 'is_published' => 1],
['id' => 16, 'name' => 'Kids bicycles 14"','sub_category_id' => 12, 'is_published' => 1],
['id' => 17, 'name' => 'Kids bicycles 12"','sub_category_id' => 12, 'is_published' => 1],
['id' => 18, 'name' => 'Bmx 16','sub_category_id' => 16, 'is_published' => 1],
['id' => 19, 'name' => 'Bmx 14','sub_category_id' => 16, 'is_published' => 1],
];
SubSubCategory::insert($subsubcategory);
}
Smiling Starling