create new controller and fix the other

This commit is contained in:
2025-08-06 10:05:20 +03:30
parent 0e8b8fda7e
commit 43ad404635
6 changed files with 52 additions and 5 deletions

View File

@@ -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,