fix: update airport management

This commit is contained in:
2026-08-19 08:17:48 +03:30
parent 97c01a17a3
commit 68d11dcbd5
2 changed files with 102 additions and 4 deletions
+20 -1
View File
@@ -14,6 +14,15 @@ class AirportStoreRequest extends FormRequest
{
return true;
}
protected function prepareForValidation(): void
{
// کد فرودگاه همیشه با حروف بزرگ ذخیره شود (IATA)
if ($this->has('code')) {
$this->merge([
'code' => strtoupper($this->input('code')),
]);
}
}
/**
* Get the validation rules that apply to the request.
@@ -35,7 +44,7 @@ class AirportStoreRequest extends FormRequest
'string',
'max:100'
],
'country' =>
'province' =>
[
'required',
'string',
@@ -50,6 +59,16 @@ class AirportStoreRequest extends FormRequest
];
}
public function attributes(): array
{
return [
'name' => 'نام فرودگاه',
'city' => 'شهر',
'country' => 'کشور',
'code' => 'کد فرودگاه',
];
}
// public function messages(): array
// {
// return [