add user id column to azmayesh table

This commit is contained in:
2024-12-02 10:37:48 +03:30
parent cc0eb78a53
commit a706406261
5 changed files with 63 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ namespace Database\Factories;
use App\Models\AzmayeshType;
use App\Models\Province;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
@@ -38,6 +39,10 @@ class AzmayeshFactory extends Factory
'project_name' => $this->faker->name,
'consultant' => $this->faker->name,
'applicant' => $this->faker->name,
'user_id' => User::factory(),
'user_name' => function (array $attributes) {
return User::query()->find($attributes['user_id'])->name;
},
];
}
}