diff --git a/app/Enums/BookingStatus.php b/app/Enums/BookingStatus.php
new file mode 100644
index 0000000..e13fbe6
--- /dev/null
+++ b/app/Enums/BookingStatus.php
@@ -0,0 +1,10 @@
+
+
+
+
+ @error('')
+
{{ $message }}
+ @enderror
+
+
+
+
+ رزروهای من
+
+
+
+
+ @forelse($bookings as $booking)
+
+
+
+
+
+
+
+ @if($booking->flight)
+
+
+
+
+ رزرو پرواز
+
+
+
+
+ {{ $booking->flight->title }}
+
+
+
+ قیمت:
+ {{ number_format($booking->flight->price) }}
+ تومان
+
+
+ @if($booking->flight->departureAirport)
+
+ مبدا:
+ {{ $booking->flight->departureAirport->city->name }}
+
+ @endif
+
+ @if($booking->flight->arrivalAirport)
+
+ مقصد:
+ {{ $booking->flight->arrivalAirport->city->name }}
+
+ @endif
+
+
+
+ @elseif($booking->tour)
+
+
+
+
+ رزرو تور
+
+
+
+
+ {{ $booking->tour->title }}
+
+
+
+ قیمت:
+ {{ number_format($booking->tour->price) }}
+ تومان
+
+
+
+ مبدا:
+ {{ $booking->tour->origin }}
+
+
+
+ مقصد:
+ {{ $booking->tour->destination }}
+
+
+ @endif
+
+
+
+
+ وضعیت رزرو:
+
+ @if($booking->status === \App\Enums\BookingStatus::PENDING)
+ در انتظار تأیید
+
+ @elseif($booking->status === \App\Enums\BookingStatus::CONFIRMED)
+ تأیید شده
+
+ @elseif($booking->status === \App\Enums\BookingStatus::CANCELLED)
+ لغو شده
+ @endif
+
+
+
+
+
+
+ کد پیگیری:
+ {{ $booking->tracking_code }}
+
+
+
+
+
+
+ تاریخ رزرو:
+ {{ $booking->created_at->toJalali()->format('Y/m/d') }}
+
+
+
+
+
+
+
+
+ @empty
+
+
+
+
+
+
+
+
+ هنوز رزروی ندارید.
+
+
+
+ رزروهای پرواز و تور شما در این قسمت نمایش داده میشوند.
+
+
+
+
+
+
+ @endforelse
+
+
+
+
+ {{-- Pagination --}}
+ @if($bookings->hasPages())
+
+
+
+ @endif
+
+
+
+
+
+
+
+@endsection
+
diff --git a/resources/views/admin/activity-logs/index.blade.php b/resources/views/admin/activity-logs/index.blade.php
new file mode 100644
index 0000000..eb1612b
--- /dev/null
+++ b/resources/views/admin/activity-logs/index.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')لاگ تغییرات
ثبت چه کسی، چه زمانی و چه تغییری روی اطلاعات پرواز و تور@endsection
+@section('content')| مدیر | بخش | عملیات | شرح تغییر | تاریخ |
@forelse(($logs ?? []) as $log)| {{ $log->admin->first_name ?? '-' }} {{ $log->admin->last_name ?? '' }} | {{ $log->subject_type ?? '-' }} | {{ $log->action ?? '-' }} | {{ $log->description ?? '-' }} | {{ isset($log->created_at) ? $log->created_at->toJalali()->format('Y/m/d H:i') : '-' }} |
@empty| لاگی برای نمایش وجود ندارد. |
@endforelse
{{ ($logs ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/admins/create.blade.php b/resources/views/admin/admins/create.blade.php
new file mode 100644
index 0000000..3ac2129
--- /dev/null
+++ b/resources/views/admin/admins/create.blade.php
@@ -0,0 +1,14 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')ایجاد مدیر
اطلاعات مدیر سامانه@endsection
+@section('content')@include('admin.partials.errors')
+
@endsection
diff --git a/resources/views/admin/admins/edit.blade.php b/resources/views/admin/admins/edit.blade.php
new file mode 100644
index 0000000..efdaa3a
--- /dev/null
+++ b/resources/views/admin/admins/edit.blade.php
@@ -0,0 +1,14 @@
+@extends('admin.layouts.app')
+@section('breadcrumb'){{ isset($admin) ? 'ویرایش مدیر' : 'ایجاد مدیر' }}
اطلاعات مدیر سامانه@endsection
+@section('content')@include('admin.partials.errors')
+
@endsection
diff --git a/resources/views/admin/admins/index.blade.php b/resources/views/admin/admins/index.blade.php
new file mode 100644
index 0000000..1366fe4
--- /dev/null
+++ b/resources/views/admin/admins/index.blade.php
@@ -0,0 +1,10 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت مدیران سایت
تعریف مدیر، فعال/غیرفعالسازی و مدیریت دسترسی@endsection
+@section('content')
+@include('admin.partials.errors')
+
+
| مدیر | ایمیل | وضعیت | آخرین ورود | تاریخ ثبت | عملیات |
+@forelse(($admins ?? []) as $admin){{ $admin->first_name }} {{ $admin->last_name }} #{{ $admin->id }} | {{ $admin->email }} | @if($admin->status)فعال@elseغیرفعال@endif | {{ isset($admin->last_login_at) && $admin->last_login_at ? $admin->last_login_at->toJalali()->format('Y/m/d H:i') : '-' }} | {{ isset($admin->created_at) ? $admin->created_at->toJalali()->format('Y/m/d H:i') : '-' }} | |
+@empty| مدیری ثبت نشده است. |
@endforelse
+{{ ($admins ?? collect())->links() }}
+
@endsection
diff --git a/resources/views/admin/bookings/index.blade.php b/resources/views/admin/bookings/index.blade.php
new file mode 100644
index 0000000..78b7901
--- /dev/null
+++ b/resources/views/admin/bookings/index.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت رزروها
مشاهده و پیگیری رزروهای پرواز و تور@endsection
+@section('content')| کد رهگیری | کاربر | نوع | تعداد مسافر | مبلغ | وضعیت | تاریخ |
@forelse(($bookings ?? []) as $booking)| {{ $booking->tracking_code }} | {{ $booking->user->first_name ?? '' }} {{ $booking->user->last_name ?? '' }} | {{ $booking->flight_id ? 'پرواز' : 'تور' }} | {{ ($booking->adult_count ?? 0)+($booking->child_count ?? 0) }} | {{ number_format($booking->total_price) }} تومان | {{ $booking->status->name ?? $booking->status }} | {{ $booking->created_at?->toJalali()->format('Y/m/d H:i') }} |
@empty| رزروی ثبت نشده است. |
@endforelse
{{ ($bookings ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/categories/create.blade.php b/resources/views/admin/categories/create.blade.php
new file mode 100644
index 0000000..e044e2f
--- /dev/null
+++ b/resources/views/admin/categories/create.blade.php
@@ -0,0 +1,71 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+ @error('general')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/categories/edit.blade.php b/resources/views/admin/categories/edit.blade.php
new file mode 100644
index 0000000..5f9a683
--- /dev/null
+++ b/resources/views/admin/categories/edit.blade.php
@@ -0,0 +1,75 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+ @error('general')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/categories/index.blade.php b/resources/views/admin/categories/index.blade.php
new file mode 100644
index 0000000..401b9c7
--- /dev/null
+++ b/resources/views/admin/categories/index.blade.php
@@ -0,0 +1,181 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+@endsection
+
+@section('content')
+
+
+ @error('general')
+
{{ $message }}
+ @enderror
+
+ @error('success')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | دستهبندی |
+ تعداد محصولات |
+ وضعیت |
+
+ تاریخ ایجاد |
+ اقدامات |
+
+
+
+ @foreach($categories as $category)
+
+
+
+
+ @if($category->image)
+
+ @else
+
+ @endif
+
+
+
+
+ |
+
+ {{ $category->products->count() }} |
+
+ @if($category->is_active)
+
+ فعال
+
+ @else
+
+ غیر فعال
+
+ @endif
+ |
+ {{ $category->created_at->toJalali()->format('H:i Y-m-d') }} |
+
+
+
+
+
+
+
+
+
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+ {{$categories->links()}}
+
+
+
+
+@endsection
diff --git a/resources/views/admin/categories/show.blade.php b/resources/views/admin/categories/show.blade.php
new file mode 100644
index 0000000..15eb9c4
--- /dev/null
+++ b/resources/views/admin/categories/show.blade.php
@@ -0,0 +1,159 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $category->name }}
+
+
+ - توضیحات:
+ - {{ $category->description }}
+
+
+
+
+
+
{{ $category->products->count() }}
+
تعداد محصولات
+
+
+
+
+
+ @if($category->is_active)
+
+ فعال
+
+ @else
+
+ غیر فعال
+
+ @endif
+
+
+
وضعیت دستهبندی
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | محصول |
+ دستهبندی فعلی |
+ قیمت |
+ قیمت تخفیفخورده |
+ موجودی |
+ وضعیت |
+ منتشر شده |
+ اقدامات |
+
+
+
+
+ @foreach($products as $product)
+
+
+
+
+ @if($product->defaultImage )
+
+ @else
+
+ @endif
+
+
+ {{ $product->name}}
+ {{ $product->description }}
+
+
+ |
+ {{ $product->productCategory->name }} |
+ {{number_format($product->price)}} تومان |
+
+ {{ number_format(discount($product->price , $product->discount)) }}تومان
+ |
+ {{ $product->qty }} |
+
+ @switch($product->status)
+ @case(\App\Enums\ProductStatus::DISABLE)
+ غیر فعال
+ @break
+ @case(\App\Enums\ProductStatus::DRAFT)
+ پیش نویس
+ @break
+ @case(\App\Enums\ProductStatus::PUBLISHED)
+ منتشر شده
+ @break
+ @case(\App\Enums\ProductStatus::ENABLE)
+ فعال
+ @break
+ @endswitch
+ |
+ {{ $category->created_at->toJalali()->format('H:i Y-F-d') }} |
+
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/cities/index.blade.php b/resources/views/admin/cities/index.blade.php
new file mode 100644
index 0000000..4413741
--- /dev/null
+++ b/resources/views/admin/cities/index.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت شهرها
@endsection
+@section('content')@include('admin.partials.errors')
| # | شهر | استان | عملیات |
@forelse(($cities ?? []) as $city)| {{ $city->id }} | {{ $city->name }} | {{ $city->province->name ?? '-' }} | ویرایش |
@empty| شهری ثبت نشده است. |
@endforelse
{{ ($cities ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php
new file mode 100644
index 0000000..9ac9b5e
--- /dev/null
+++ b/resources/views/admin/dashboard.blade.php
@@ -0,0 +1,42 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+داشبورد مدیریت
نمای کلی سامانه هواپیمایی و تور
+@endsection
+
+@section('content')
+
+
+ @php($cards = [
+ ['title'=>'کاربران ثبتنامشده','value'=>$usersCount ?? 0,'icon'=>'ri-group-line','class'=>'primary'],
+ ['title'=>'پروازهای فعال','value'=>$flightsCount ?? 0,'icon'=>'ri-flight-takeoff-line','class'=>'success'],
+ ['title'=>'تورهای فعال','value'=>$toursCount ?? 0,'icon'=>'ri-map-2-line','class'=>'warning'],
+ ['title'=>'رزروهای در انتظار','value'=>$pendingBookings ?? 0,'icon'=>'ri-calendar-check-line','class'=>'danger'],
+ ])
+ @foreach($cards as $card)
+
{{ $card['title'] }}
{{ number_format($card['value']) }}
+ @endforeach
+
+
+
+
+
+ @forelse(($latestLogs ?? []) as $log)
+
{{ $log->action ?? 'تغییر اطلاعات' }}{{ isset($log->created_at) ? $log->created_at->toJalali()->format('Y/m/d H:i') : '-' }}
{{ $log->description ?? '' }}
+ @empty
+
فعالیتی برای نمایش وجود ندارد.
+ @endforelse
+
+
+
+@endsection
+
+@push('scripts')
+
+
+@endpush
diff --git a/resources/views/admin/flights/create.blade.php b/resources/views/admin/flights/create.blade.php
new file mode 100644
index 0000000..39c4771
--- /dev/null
+++ b/resources/views/admin/flights/create.blade.php
@@ -0,0 +1,18 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')درج پرواز
اطلاعات مورد نیاز سفر@endsection
+@section('content')@include('admin.partials.errors')
+
@endsection
+@push('scripts')@endpush
diff --git a/resources/views/admin/flights/edit.blade.php b/resources/views/admin/flights/edit.blade.php
new file mode 100644
index 0000000..4f81a43
--- /dev/null
+++ b/resources/views/admin/flights/edit.blade.php
@@ -0,0 +1,18 @@
+@extends('admin.layouts.app')
+@section('breadcrumb'){{ isset($flight) ? 'ویرایش پرواز' : 'درج پرواز' }}
اطلاعات مورد نیاز سفر@endsection
+@section('content')@include('admin.partials.errors')
+
@endsection
+@push('scripts')@endpush
diff --git a/resources/views/admin/flights/index.blade.php b/resources/views/admin/flights/index.blade.php
new file mode 100644
index 0000000..2f5917f
--- /dev/null
+++ b/resources/views/admin/flights/index.blade.php
@@ -0,0 +1,5 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت پروازها
درج، ویرایش، حذف و جستجوی پروازهای داخلی، خارجی و چارتر@endsection
+@section('content')@include('admin.partials.errors')
+
+
| عنوان سفر | نوع | تاریخ حرکت | قیمت | ظرفیت | بازدید | وضعیت | عملیات |
@forelse(($flights ?? []) as $flight){{ $flight->title }} #{{ $flight->id }} | @switch((int)$flight->flight_type) @case(1) داخلی @break @case(2) خارجی @break @case(3) چارتر @break @default - @endswitch | {{ isset($flight->departure_time) ? $flight->departure_time->toJalali()->format('Y/m/d H:i') : '-' }} | {{ number_format($flight->price) }} تومان | {{ number_format($flight->capacity) }} | {{ number_format($flight->views ?? 0) }} | @if($flight->status)فعال@elseغیرفعال@endif | |
@empty| پروازی ثبت نشده است. |
@endforelse
{{ ($flights ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/flights/show.blade.php b/resources/views/admin/flights/show.blade.php
new file mode 100644
index 0000000..d057d5f
--- /dev/null
+++ b/resources/views/admin/flights/show.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')جزئیات پرواز
مشاهده اطلاعات ثبتشده و سابقه تغییرات@endsection
+@section('content'){{ $flight->title }}
{{ $flight->summary }}
نوع: {{ [1=>'داخلی',2=>'خارجی',3=>'چارتر'][$flight->flight_type] ?? '-' }}
قیمت: {{ number_format($flight->price) }} تومان
ظرفیت: {{ number_format($flight->capacity) }}
بازدید: {{ number_format($flight->views ?? 0) }}
تاریخ حرکت: {{ $flight->departure_time?->toJalali()->format('Y/m/d H:i') }}
@endsection
diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php
new file mode 100644
index 0000000..a5efccc
--- /dev/null
+++ b/resources/views/admin/layouts/app.blade.php
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+ پنل مدیریت
+ @isset($title)
+ |
+ {{$title}}
+ @endisset
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ isset($rawLayout)])>
+
+
+
+
 }})
+
+
+
+
+
+ @includeUnless(isset($rawLayout), 'admin.layouts.header')
+
+ @includeUnless(isset($rawLayout), 'admin.layouts.sidebar')
+
+
+
+
+
!isset($rawLayout)])>
+ @yield('content')
+
+
+
+ @includeUnless(isset($rawLayout), 'admin.layouts.footer')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@stack('scripts')
+
+
+
diff --git a/resources/views/admin/layouts/footer.blade.php b/resources/views/admin/layouts/footer.blade.php
new file mode 100644
index 0000000..3fa45dc
--- /dev/null
+++ b/resources/views/admin/layouts/footer.blade.php
@@ -0,0 +1,11 @@
+
+
+
diff --git a/resources/views/admin/layouts/header.blade.php b/resources/views/admin/layouts/header.blade.php
new file mode 100644
index 0000000..99bf994
--- /dev/null
+++ b/resources/views/admin/layouts/header.blade.php
@@ -0,0 +1,137 @@
+
diff --git a/resources/views/admin/layouts/sidebar.blade.php b/resources/views/admin/layouts/sidebar.blade.php
new file mode 100644
index 0000000..15c42f9
--- /dev/null
+++ b/resources/views/admin/layouts/sidebar.blade.php
@@ -0,0 +1,38 @@
+
diff --git a/resources/views/admin/login.blade.php b/resources/views/admin/login.blade.php
new file mode 100644
index 0000000..987b31e
--- /dev/null
+++ b/resources/views/admin/login.blade.php
@@ -0,0 +1,31 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
ورود به پنل مدیریت
+
برای ورود به پنل مدیریت اطلاعات حساب مدیر را وارد کنید.
+ @error('general')
{{ $message }}
@enderror
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/orders/edit.blade.php b/resources/views/admin/orders/edit.blade.php
new file mode 100644
index 0000000..8977129
--- /dev/null
+++ b/resources/views/admin/orders/edit.blade.php
@@ -0,0 +1,65 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+ @error('status')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/orders/index.blade.php b/resources/views/admin/orders/index.blade.php
new file mode 100644
index 0000000..b6b9e16
--- /dev/null
+++ b/resources/views/admin/orders/index.blade.php
@@ -0,0 +1,170 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | شناسه |
+ مشتری |
+ مبلغ |
+ وضعیت |
+ تاریخ ثبت |
+ عملیات |
+
+
+
+
+ @foreach($orders as $order)
+
+
+
+
+
+ #{{ $order->id }}
+
+
+ |
+
+ {{ getUserFullName($order->user) }}
+ |
+
+ {{ number_format($order->total_price )}}
+ تومان
+ |
+
+
+ @switch($order->status)
+ @case(\App\Enums\OrderStatus::PENDING)
+ در انتظار پرداخت
+ @break
+ @case(\App\Enums\OrderStatus::PROCESSING)
+ در حال پردازش
+ @break
+ @case(\App\Enums\OrderStatus::SENT)
+ ارسال شده
+ @break
+ @case(\App\Enums\OrderStatus::DELIVERED)
+ تحویل شده
+ @break
+ @case(\App\Enums\OrderStatus::CANCELLED)
+ لغو شده
+ @break
+ @endswitch
+
+ |
+ {{$order->created_at->toJalali()->format('Y/m/d H:i')}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {{$orders->links()}}
+
+
+
+@endsection
diff --git a/resources/views/admin/orders/show.blade.php b/resources/views/admin/orders/show.blade.php
new file mode 100644
index 0000000..6b8bcaa
--- /dev/null
+++ b/resources/views/admin/orders/show.blade.php
@@ -0,0 +1,184 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ تعداد کالا:
+ |
+ {{ $order->total_products }} |
+
+
+ |
+ وضعیت سفارش:
+ |
+
+
+ @switch($order->status)
+ @case(\App\Enums\OrderStatus::PENDING)
+ در انتظار پرداخت
+ @break
+ @case(\App\Enums\OrderStatus::PROCESSING)
+ در حال پردازش
+ @break
+ @case(\App\Enums\OrderStatus::SENT)
+ ارسال شده
+ @break
+ @case(\App\Enums\OrderStatus::DELIVERED)
+ تحویل شده
+ @break
+ @endswitch
+
+ |
+
+
+ |
+ مبلغ کل:
+ |
+
+
+ {{number_format($order->total_price) }}
+ تومان
+
+ |
+
+
+ |
+ توضیحات:
+ |
+ {{ $order->description }} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ آدرس:
+ {{ $order->user_address }}
+
+
+ شماره تماس:
+ {{ $order->user_mobile }}
+
+
+ کد پستی:
+ {{ $order->user_postal_code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
نام:{{ getUserFullName($order->user) }}
+
ایمیل: {{$order->user->email}}
+
موبایل: {{ $order->user_mobile }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | محصول |
+ قیمت |
+ تعداد |
+ مبلغ نهایی |
+
+
+
+ @foreach ($order->orderItems as $orderItem)
+
+
+
+
+
+
+
+
+ {{$orderItem->product->name}}
+ |
+ {{$orderItem->product->en_name}}
+
+
+
+
+
+
+ |
+
+ {{ $orderItem->product->price }}
+ تومان
+ |
+ {{ $orderItem->qty }} |
+
+ {{ number_format(discountPrice($orderItem->unit_price, $orderItem->unit_discount) * $orderItem->qty) }}
+ تومان
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/partials/errors.blade.php b/resources/views/admin/partials/errors.blade.php
new file mode 100644
index 0000000..74a4768
--- /dev/null
+++ b/resources/views/admin/partials/errors.blade.php
@@ -0,0 +1,4 @@
+@if($errors->any())
+@foreach($errors->all() as $error)- {{ $error }}
@endforeach
+@endif
+@if(session('success')){{ session('success') }}
@endif
diff --git a/resources/views/admin/products/create.blade.php b/resources/views/admin/products/create.blade.php
new file mode 100644
index 0000000..609db57
--- /dev/null
+++ b/resources/views/admin/products/create.blade.php
@@ -0,0 +1,141 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/products/edit.blade.php b/resources/views/admin/products/edit.blade.php
new file mode 100644
index 0000000..7f1b236
--- /dev/null
+++ b/resources/views/admin/products/edit.blade.php
@@ -0,0 +1,171 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+ @error('error')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/products/index.blade.php b/resources/views/admin/products/index.blade.php
new file mode 100644
index 0000000..10c9287
--- /dev/null
+++ b/resources/views/admin/products/index.blade.php
@@ -0,0 +1,179 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+@endsection
+
+@section('content')
+
+
+
+
+
+
+ @error('success')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | نام |
+ دسته بندی |
+ قیمت |
+ تخفیف |
+ موجودی |
+ تاریخ ثبت |
+ عملیات |
+
+
+
+ @foreach($products as $product)
+
+
+
+
+ @if($product->defaultImage )
+
+ @else
+
+ @endif
+
+
+
+ |
+ {{ $product->productCategory->name }} |
+
+ {{ number_format($product->price) }}
+ تومان
+ |
+
+ {{ $product->discount }} %
+ |
+
+ {{ $product->qty }}
+ |
+ {{ $product->created_at->toJalali()->format('H:i Y-m-d') }} |
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/products/show.blade.php b/resources/views/admin/products/show.blade.php
new file mode 100644
index 0000000..778fe20
--- /dev/null
+++ b/resources/views/admin/products/show.blade.php
@@ -0,0 +1,104 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+ @if($product->defaultImage)
+
 }})
+ @else
+
 }})
+ @endif
+
+
+
+
+
+
نام محصول:
+
{{ $product->name }}
+
+
+
+
+
دستهبندی:
+
{{ $product->productCategory->name }}
+
+
+
+
قیمت:
+
+ {{ number_format($product->price) }}
+ تومان
+
+
+
+
+
قیمت تخفیفی:
+
+ {{ number_format(discount($product->price, $product->discount)) }}
+ تومان
+
+
+
+
+
موجودی:
+
{{ $product->qty }}
+
+
+
+
وضعیت:
+
+ @switch($product->status)
+ @case(\App\Enums\ProductStatus::DISABLE)
+ غیر فعال
+ @break
+ @case(\App\Enums\ProductStatus::DRAFT)
+ پیش نویس
+ @break
+ @case(\App\Enums\ProductStatus::PUBLISHED)
+ منتشر شده
+ @break
+ @case(\App\Enums\ProductStatus::ENABLE)
+ فعال
+ @break
+ @endswitch
+
+
+
+
+
توضیحات:
+
{{ $product->description }}
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/provinces/index.blade.php b/resources/views/admin/provinces/index.blade.php
new file mode 100644
index 0000000..3fd90bc
--- /dev/null
+++ b/resources/views/admin/provinces/index.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت استانها
@endsection
+@section('content')@include('admin.partials.errors')
| # | استان | عملیات |
@forelse(($provinces ?? []) as $province)| {{ $province->id }} | {{ $province->name }} | ویرایش |
@empty| استانی ثبت نشده است. |
@endforelse
{{ ($provinces ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/settings/edit.blade.php b/resources/views/admin/settings/edit.blade.php
new file mode 100644
index 0000000..1c7157b
--- /dev/null
+++ b/resources/views/admin/settings/edit.blade.php
@@ -0,0 +1,53 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+ @error('general')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/settings/index.blade.php b/resources/views/admin/settings/index.blade.php
new file mode 100644
index 0000000..ac5028d
--- /dev/null
+++ b/resources/views/admin/settings/index.blade.php
@@ -0,0 +1,117 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+@endsection
+
+@section('content')
+
+
+ @error('success')
+
{{ $message }}
+ @enderror
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | شناسه |
+ نام |
+ مقدار |
+ آپدیت |
+ عملیات |
+
+
+
+ @foreach($settings as $setting)
+
+ |
+
+ |
+ {{ $setting->title }} |
+ {{ $setting-> value }} |
+ {{ $setting->updated_at->toJalali()->format('H:i Y-m-d') }} |
+
+
+ |
+
+
+
+ @endforeach
+
+
+
+
+
+ {{$settings->links()}}
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/tours/create.blade.php b/resources/views/admin/tours/create.blade.php
new file mode 100644
index 0000000..c68541e
--- /dev/null
+++ b/resources/views/admin/tours/create.blade.php
@@ -0,0 +1,17 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')درج تور
فیلدهای مورد نیاز سفر@endsection
+@section('content')@include('admin.partials.errors')
+@if(false)
| شروع | پایان | قیمت | ظرفیت | وضعیت | |
@forelse(($tour->tourDates ?? []) as $date)| {{ $date->start_date->toJalali()->format('Y/m/d') }} | {{ $date->end_date->toJalali()->format('Y/m/d') }} | {{ number_format($date->price) }} | {{ $date->capacity }} | {{ $date->status ? 'فعال':'غیرفعال' }} | |
@empty| تاریخی برای این تور ثبت نشده است. |
@endforelse
@endif
+
@endsection
+@push('scripts')@endpush
diff --git a/resources/views/admin/tours/edit.blade.php b/resources/views/admin/tours/edit.blade.php
new file mode 100644
index 0000000..9d750e2
--- /dev/null
+++ b/resources/views/admin/tours/edit.blade.php
@@ -0,0 +1,17 @@
+@extends('admin.layouts.app')
+@section('breadcrumb'){{ isset($tour) ? 'ویرایش تور' : 'درج تور' }}
فیلدهای مورد نیاز سفر@endsection
+@section('content')@include('admin.partials.errors')
+@if(isset($tour))
| شروع | پایان | قیمت | ظرفیت | وضعیت | |
@forelse(($tour->tourDates ?? []) as $date)| {{ $date->start_date->toJalali()->format('Y/m/d') }} | {{ $date->end_date->toJalali()->format('Y/m/d') }} | {{ number_format($date->price) }} | {{ $date->capacity }} | {{ $date->status ? 'فعال':'غیرفعال' }} | |
@empty| تاریخی برای این تور ثبت نشده است. |
@endforelse
@endif
+
@endsection
+@push('scripts')@endpush
diff --git a/resources/views/admin/tours/index.blade.php b/resources/views/admin/tours/index.blade.php
new file mode 100644
index 0000000..25c9e53
--- /dev/null
+++ b/resources/views/admin/tours/index.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')مدیریت تورها
درج، ویرایش، حذف و مدیریت تورهای داخلی و خارجی@endsection
+@section('content')@include('admin.partials.errors')
| عنوان تور | مسیر | مدت | قیمت | بازدید | وضعیت | عملیات |
@forelse(($tours ?? []) as $tour){{ $tour->title }} #{{ $tour->id }} | {{ $tour->origin }} ← {{ $tour->destination }} | {{ $tour->duration }} روز | {{ number_format($tour->price ?? 0) }} تومان | {{ number_format($tour->views ?? 0) }} | @if($tour->status)فعال@elseغیرفعال@endif | |
@empty| توری ثبت نشده است. |
@endforelse
{{ ($tours ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/tours/show.blade.php b/resources/views/admin/tours/show.blade.php
new file mode 100644
index 0000000..4804a34
--- /dev/null
+++ b/resources/views/admin/tours/show.blade.php
@@ -0,0 +1,3 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')جزئیات تور
مشاهده اطلاعات تور و تاریخهای قابل رزرو@endsection
+@section('content'){{ $tour->title }}
{{ $tour->summary }}
مسیر: {{ $tour->origin }} ← {{ $tour->destination }}
مدت: {{ $tour->duration }} روز
قیمت: {{ number_format($tour->price ?? 0) }} تومان
توضیحات:{!! nl2br(e($tour->descriptions)) !!}
@endsection
diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php
new file mode 100644
index 0000000..75ea8f0
--- /dev/null
+++ b/resources/views/admin/users/edit.blade.php
@@ -0,0 +1,89 @@
+@extends('admin.layouts.app')
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php
new file mode 100644
index 0000000..e1fa362
--- /dev/null
+++ b/resources/views/admin/users/index.blade.php
@@ -0,0 +1,5 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')ثبتنامهای سایت
جستجو، مشاهده، ویرایش، حذف و مدیریت کاربران@endsection
+@section('content')@include('admin.partials.errors')
+
+
| کاربر | ایمیل | موبایل | تاریخ ثبتنام | عملیات |
@forelse(($users ?? []) as $user)| {{ trim(($user->first_name ?? '').' '.($user->last_name ?? '')) ?: '-' }} | {{ $user->email }} | {{ $user->mobile ?? '-' }} | {{ isset($user->created_at) ? $user->created_at->toJalali()->format('Y/m/d H:i') : '-' }} | |
@empty| کاربری یافت نشد. |
@endforelse
{{ ($users ?? collect())->links() }}
@endsection
diff --git a/resources/views/admin/users/show.blade.php b/resources/views/admin/users/show.blade.php
new file mode 100644
index 0000000..c53ba04
--- /dev/null
+++ b/resources/views/admin/users/show.blade.php
@@ -0,0 +1,123 @@
+@extends('admin.layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+ - نام کامل:
+ - {{ getUserFullName($user) }}
+
+ - ایمیل:
+ - {{ $user->email }}
+
+ - شماره تلفن:
+ - {{ $user->mobile }}
+
+ - تاریخ ثبتنام:
+ - {{ $user->created_at->toJalali()->format('H:i Y/m/d') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | شناسه |
+ مبلغ |
+ وضعیت |
+ تاریخ ثبت |
+ عملیات |
+
+
+
+ @foreach($userOrders as $order)
+
+
+
+
+ #{{ $order->id }}
+
+
+ |
+
+ {{ number_format($order->total_price )}}
+ تومان
+ |
+
+
+ @switch($order->status)
+ @case(\App\Enums\OrderStatus::PENDING)
+ در انتظار پرداخت
+ @break
+ @case(\App\Enums\OrderStatus::PROCESSING)
+ در حال پردازش
+ @break
+ @case(\App\Enums\OrderStatus::SENT)
+ ارسال شده
+ @break
+ @case(\App\Enums\OrderStatus::DELIVERED)
+ تحویل شده
+ @break
+ @endswitch
+ |
+ {{$order->created_at->toJalali()->format('Y/m/d')}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/routes/admin.php b/routes/admin.php
new file mode 100644
index 0000000..ec00c6f
--- /dev/null
+++ b/routes/admin.php
@@ -0,0 +1,85 @@
+name('admin.')->group(function () {
+ Route::get('/', fn () => redirect()->route('admin.dashboard.index'))->name('index');
+
+ Route::prefix('auth')->name('auth.')->group(function () {
+ Route::middleware('guest:admin')->prefix('login')->name('login.')->group(function () {
+ Route::get('/', 'App\\Http\\Controllers\\Admin\\AuthController@login')->name('index');
+ Route::post('/', 'App\\Http\\Controllers\\Admin\\AuthController@loginPost')->name('post');
+ });
+ Route::get('logout', 'App\\Http\\Controllers\\Admin\\AuthController@logout')->middleware('auth:admin')->name('logout');
+ });
+
+ Route::middleware('auth:admin')->group(function () {
+ Route::get('dashboard', 'App\\Http\\Controllers\\Admin\\DashboardController@index')->name('dashboard.index');
+
+ Route::prefix('users')->name('users.')->controller('App\\Http\\Controllers\\Admin\\UserController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('{user}/show', 'show')->name('show');
+ Route::get('{user}/edit', 'edit')->name('edit');
+ Route::put('{user}/update', 'update')->name('update');
+ Route::delete('{user}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::prefix('admins')->name('admins.')->controller('App\\Http\\Controllers\\Admin\\AdminController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('create', 'create')->name('create');
+ Route::post('store', 'store')->name('store');
+ Route::get('{admin}/edit', 'edit')->name('edit');
+ Route::put('{admin}/update', 'update')->name('update');
+ Route::delete('{admin}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::prefix('flights')->name('flights.')->controller('App\\Http\\Controllers\\Admin\\FlightController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('create', 'create')->name('create');
+ Route::post('store', 'store')->name('store');
+ Route::get('{flight}/show', 'show')->name('show');
+ Route::get('{flight}/edit', 'edit')->name('edit');
+ Route::put('{flight}/update', 'update')->name('update');
+ Route::delete('{flight}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::prefix('tours')->name('tours.')->controller('App\\Http\\Controllers\\Admin\\TourController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('create', 'create')->name('create');
+ Route::post('store', 'store')->name('store');
+ Route::get('{tour}/show', 'show')->name('show');
+ Route::get('{tour}/edit', 'edit')->name('edit');
+ Route::put('{tour}/update', 'update')->name('update');
+ Route::delete('{tour}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::post('tours/{tour}/dates', 'App\\Http\\Controllers\\Admin\\TourDateController@store')->name('tour-dates.store');
+ Route::delete('tour-dates/{tourDate}', 'App\\Http\\Controllers\\Admin\\TourDateController@destroy')->name('tour-dates.destroy');
+
+ Route::prefix('bookings')->name('bookings.')->controller('App\\Http\\Controllers\\Admin\\BookingController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('{booking}/show', 'show')->name('show');
+ Route::patch('{booking}/update', 'update')->name('update');
+ });
+
+ Route::prefix('provinces')->name('provinces.')->controller('App\\Http\\Controllers\\Admin\\ProvinceController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('create', 'create')->name('create');
+ Route::post('store', 'store')->name('store');
+ Route::get('{province}/edit', 'edit')->name('edit');
+ Route::put('{province}/update', 'update')->name('update');
+ Route::delete('{province}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::prefix('cities')->name('cities.')->controller('App\\Http\\Controllers\\Admin\\CityController')->group(function () {
+ Route::get('/', 'index')->name('index');
+ Route::get('create', 'create')->name('create');
+ Route::post('store', 'store')->name('store');
+ Route::get('{city}/edit', 'edit')->name('edit');
+ Route::put('{city}/update', 'update')->name('update');
+ Route::delete('{city}/destroy', 'destroy')->name('destroy');
+ });
+
+ Route::get('activity-logs', 'App\\Http\\Controllers\\Admin\\ActivityLogController@index')->name('activity-logs.index');
+ });
+});