first commit
This commit is contained in:
33
database/factories/HospitalUnitFactory.php
Normal file
33
database/factories/HospitalUnitFactory.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\HospitalUnit;
|
||||
use App\Models\Profile;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<HospitalUnit>
|
||||
*/
|
||||
class HospitalUnitFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$name = fake()->unique()->words(3, true);
|
||||
|
||||
return [
|
||||
'profile_id' => Profile::factory(),
|
||||
'name' => $name,
|
||||
'slug' => Str::slug(Str::ascii($name)),
|
||||
'is_reporting_unit' => false,
|
||||
'report_input_type' => null,
|
||||
'is_active' => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user