feat: add factory for models

This commit is contained in:
amir-ys
2024-11-23 22:14:01 +03:30
parent 26a0acb1d2
commit a74492e488
36 changed files with 600 additions and 16 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Database\Factories;
use App\Models\MedicalCenter;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<MedicalCenter>
*/
class MedicalCenterFactory extends Factory
{
protected $model = MedicalCenter::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => $this->faker->company,
'address' => $this->faker->address,
'phone_number' => $this->faker->phoneNumber,
'city_id' => 1,
];
}
}