diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 1216fce..4017c06 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Auth; use App\Enums\User\UserStatus; use App\Http\Controllers\Controller; use App\Http\Requests\Auth\RegisterPostRequest; +use App\Models\Country; use App\Models\File; use App\Models\Province; use App\Models\User; @@ -21,7 +22,12 @@ class RegisterController extends Controller $withOutHeader = true; $withOutFooter = true; + $iranCountry = Country::where('name', 'iran')->first(); + $provinces = Province::where('status', 1) + ->whereHas('cities', function ($query) use ($iranCountry) { + $query->where('county_id', $iranCountry->id); + }) ->orderBy('name') ->pluck('name', 'id');