35 lines
894 B
PHP
35 lines
894 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Institution;
|
|
use App\Models\Lists\InstitutionCategory;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Institution>
|
|
*/
|
|
class InstitutionFactory extends Factory
|
|
{
|
|
protected $model = Institution::class;
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'category_id' => InstitutionCategory::factory(),
|
|
'name' => fake()->unique()->company(),
|
|
'abbreviation' => strtoupper(fake()->unique()->lexify('?????')),
|
|
'address' => fake()->streetAddress(),
|
|
'city' => fake()->city(),
|
|
'lat' => fake()->latitude(),
|
|
'lon' => fake()->longitude(),
|
|
'logo' => 'default.jpg',
|
|
'color' => '#c5cae9',
|
|
'is_storage_place' => true,
|
|
];
|
|
}
|
|
}
|