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; 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. * Get the validation rules that apply to the request.
@@ -35,7 +44,7 @@ class AirportStoreRequest extends FormRequest
'string', 'string',
'max:100' 'max:100'
], ],
'country' => 'province' =>
[ [
'required', 'required',
'string', 'string',
@@ -50,6 +59,16 @@ class AirportStoreRequest extends FormRequest
]; ];
} }
public function attributes(): array
{
return [
'name' => 'نام فرودگاه',
'city' => 'شهر',
'country' => 'کشور',
'code' => 'کد فرودگاه',
];
}
// public function messages(): array // public function messages(): array
// { // {
// return [ // return [
+81 -2
View File
@@ -1,3 +1,82 @@
<div> @extends('layouts.app')
<!-- Knowing is not enough; we must apply. Being willing is not enough; we must do. - Leonardo da Vinci -->
@section('title', 'حساب کاربری')
@section('content')
<div class="theme-page-section theme-page-section-gray">
<div class="container">
<div class="theme-page-section-header">
<h1 class="theme-page-section-title">
حساب کاربری
</h1>
</div> </div>
<div class="row">
<div class="col-md-3">
<div class="theme-search-results-item">
<ul>
<li>
<a href="{{ url('/account') }}">
داشبورد
</a>
</li>
<li>
<a href="{{ url('/account/bookings') }}">
رزروهای من
</a>
</li>
<li>
<a href="{{ url('/account/favorites') }}">
علاقه‌مندی‌ها
</a>
</li>
<li>
<a href="{{ url('/account/comments') }}">
نظرات
</a>
</li>
<li>
<a href="{{ url('/account/edit-profile') }}">
ویرایش پروفایل
</a>
</li>
</ul>
</div>
</div>
<div class="col-md-9">
<h3>
خوش آمدید
</h3>
<p>
از این بخش می‌توانید رزروها و اطلاعات حساب خود را مدیریت کنید.
</p>
</div>
</div>
</div>
</div>
@endsection