create new controller and fix the other
This commit is contained in:
@@ -21,7 +21,7 @@ class HarimFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'state_id' => $this->faker->numberBetween(1,5),
|
||||
'state_id' => $this->faker->numberBetween(1,15),
|
||||
'state_name' => function (array $attributes) {
|
||||
return HarimState::query()->find($attributes['state_id'])->name;
|
||||
},
|
||||
@@ -32,11 +32,11 @@ class HarimFactory extends Factory
|
||||
'request_date' => $this->faker->date(),
|
||||
'province_id' => Province::factory(),
|
||||
'province_name' => function (array $attributes) {
|
||||
return Province::query()->find($attributes['province_id'])->name;
|
||||
return Province::query()->find($attributes['province_id'])->name_fa;
|
||||
},
|
||||
'city_id' => City::factory(),
|
||||
'city_name' => function (array $attributes) {
|
||||
return City::query()->find($attributes['city_id'])->name;
|
||||
return City::query()->find($attributes['city_id'])->name_fa;
|
||||
},
|
||||
'edareh_shahri_id' => EdarateShahri::factory(),
|
||||
'county' => $this->faker->citySuffix,
|
||||
|
||||
Reference in New Issue
Block a user