Update the CompanySeeder to have a second company.
This commit is contained in:
@@ -8,11 +8,19 @@ use App\Models\Company;
|
|||||||
|
|
||||||
class CompanySeeder extends Seeder
|
class CompanySeeder extends Seeder
|
||||||
{
|
{
|
||||||
protected $test_company = [
|
protected $test_companies = [
|
||||||
|
[
|
||||||
'uuid' => 'b7301b09-fc0c-4d0d-a556-ed70fc8e40f7',
|
'uuid' => 'b7301b09-fc0c-4d0d-a556-ed70fc8e40f7',
|
||||||
'name' => 'testCompany',
|
'name' => 'testCompany',
|
||||||
'image' => null,
|
'image' => null,
|
||||||
'description' => 'Pellentesque tristique imperdiet tortor.'
|
'description' => 'Pellentesque tristique imperdiet tortor.'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'uuid' => 'b7301b09-fc0c-4d0d-a546-ed70fc8e40f7',
|
||||||
|
'name' => 'testCompany2',
|
||||||
|
'image' => null,
|
||||||
|
'description' => 'Curabitur vulputate vestibulum lorem.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,6 +28,7 @@ class CompanySeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
Company::factory()->create($this->test_company);
|
foreach($this->test_companies as $test_company)
|
||||||
|
Company::factory()->create($test_company);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user