create factory and seeder for fake data
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user