create factory and seeder for fake data

This commit is contained in:
2025-07-23 08:46:21 +03:30
parent 0b543ac1f0
commit ca89fe0371
13 changed files with 27 additions and 5 deletions

View File

@@ -19,6 +19,9 @@ class CountryKeypressReportFactory extends Factory
{
return [
'province_id' => Province::factory(),
'province_name' => function (array $attributes) {
return Province::query()->find($attributes['province_id'])->name;
},
'date' => $this->faker->date(),
'total' => $this->faker->numberBetween(1000, 10000),
'key1' => $this->faker->numberBetween(10, 100),