458 lines
12 KiB
PHP
458 lines
12 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'صفحه اصلی | آژانس مسافرتی')
|
|
|
|
@section('content')
|
|
|
|
<div class="travel-page">
|
|
|
|
<div class="container">
|
|
|
|
{{-- =========================
|
|
آخرین تورها
|
|
========================== --}}
|
|
|
|
<div class="section-heading text-center mb-5">
|
|
|
|
<h2>آخرین تورها</h2>
|
|
|
|
<p>
|
|
جدیدترین تورهای ثبت شده در آژانس هواپیمایی
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
@forelse($tours as $tour)
|
|
|
|
<div class="col-md-4 col-sm-6 mb-4">
|
|
|
|
<div class="travel-card">
|
|
|
|
{{-- تصویر --}}
|
|
<div class="travel-card-image">
|
|
|
|
@if($tour->image)
|
|
|
|
<img
|
|
src="{{ asset('storage/' . $tour->image) }}"
|
|
alt="{{ $tour->title ?? 'تور' }}"
|
|
loading="lazy"
|
|
>
|
|
|
|
@else
|
|
|
|
<img
|
|
src="{{ asset('images/no-image.jpg') }}"
|
|
alt="بدون تصویر"
|
|
loading="lazy"
|
|
>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
{{-- اطلاعات تور --}}
|
|
<div class="travel-card-body">
|
|
|
|
{{-- عنوان --}}
|
|
<h3 class="travel-card-title">
|
|
|
|
{{ $tour->title ?? 'بدون عنوان' }}
|
|
|
|
</h3>
|
|
|
|
|
|
{{-- مبدا --}}
|
|
@if(!empty($tour->origin))
|
|
|
|
<div class="travel-route">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مبدا:
|
|
|
|
{{ $tour->origin }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- مقصد --}}
|
|
@if(!empty($tour->destination))
|
|
|
|
<div class="travel-route">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مقصد:
|
|
|
|
{{ $tour->destination }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- اگر origin_id و destination_id داری --}}
|
|
@if(
|
|
empty($tour->origin) &&
|
|
!empty($tour->origin_id)
|
|
)
|
|
|
|
<div class="travel-route">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مبدا:
|
|
|
|
{{ $tour->origin_id }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
@if(
|
|
empty($tour->destination) &&
|
|
!empty($tour->destination_id)
|
|
)
|
|
|
|
<div class="travel-route">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مقصد:
|
|
|
|
{{ $tour->destination_id }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- توضیحات --}}
|
|
@php
|
|
|
|
$description =
|
|
$tour->description
|
|
?? $tour->summary
|
|
?? null;
|
|
|
|
@endphp
|
|
|
|
|
|
@if($description)
|
|
|
|
<p class="travel-card-summary">
|
|
|
|
{{ \Illuminate\Support\Str::limit(
|
|
strip_tags($description),
|
|
100
|
|
) }}
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- تاریخ شروع --}}
|
|
@if(!empty($tour->start_date))
|
|
|
|
<div class="travel-date">
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
تاریخ حرکت:
|
|
|
|
{{ $tour->start_date }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- تاریخ پایان --}}
|
|
@if(!empty($tour->end_date))
|
|
|
|
<div class="travel-date">
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
تاریخ برگشت:
|
|
|
|
{{ $tour->end_date }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- مدت سفر --}}
|
|
@if(!empty($tour->duration))
|
|
|
|
<div class="travel-duration">
|
|
|
|
<i class="fa fa-clock-o"></i>
|
|
|
|
مدت سفر:
|
|
|
|
{{ $tour->duration }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- قیمت --}}
|
|
@if(!is_null($tour->price))
|
|
|
|
<div class="travel-price">
|
|
|
|
<i class="fa fa-money"></i>
|
|
|
|
{{ number_format((int) $tour->price) }}
|
|
|
|
تومان
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- جزئیات --}}
|
|
<a
|
|
href="{{ route('tours.show', $tour->id) }}"
|
|
class="travel-btn"
|
|
>
|
|
|
|
مشاهده جزئیات
|
|
|
|
<i class="fa fa-arrow-left"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@empty
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="empty-box text-center">
|
|
|
|
هنوز هیچ تور فعالی ثبت نشده است.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforelse
|
|
|
|
</div>
|
|
|
|
|
|
{{-- صفحهبندی تورها --}}
|
|
@if($tours->hasPages())
|
|
|
|
<div class="pagination-wrapper">
|
|
|
|
{{ $tours->links() }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
{{-- =========================
|
|
آخرین پروازها
|
|
========================== --}}
|
|
|
|
<div class="flights-section">
|
|
|
|
<div class="section-heading text-center mb-5">
|
|
|
|
<h2>
|
|
آخرین پروازها
|
|
</h2>
|
|
|
|
<p>
|
|
جدیدترین پروازهای ثبت شده در سامانه
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
@forelse($flights as $flight)
|
|
|
|
<div class="col-md-4 col-sm-6 mb-4">
|
|
|
|
<div class="flight-card">
|
|
|
|
{{-- آیکون --}}
|
|
<div class="flight-icon">
|
|
|
|
<i class="fa fa-plane"></i>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- عنوان --}}
|
|
<h3 class="flight-title">
|
|
|
|
{{ $flight->title ?? 'بدون عنوان' }}
|
|
|
|
</h3>
|
|
|
|
|
|
{{-- مبدا --}}
|
|
@if(!empty($flight->origin))
|
|
|
|
<div class="flight-date">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مبدا:
|
|
|
|
{{ $flight->origin }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- مقصد --}}
|
|
@if(!empty($flight->destination))
|
|
|
|
<div class="flight-date">
|
|
|
|
<i class="fa fa-map-marker"></i>
|
|
|
|
مقصد:
|
|
|
|
{{ $flight->destination }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- توضیحات --}}
|
|
@php
|
|
|
|
$description =
|
|
$flight->description
|
|
?? $flight->summary
|
|
?? null;
|
|
|
|
@endphp
|
|
|
|
|
|
@if($description)
|
|
|
|
<p class="flight-summary">
|
|
|
|
{{ \Illuminate\Support\Str::limit(
|
|
strip_tags($description),
|
|
100
|
|
) }}
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- تاریخ حرکت --}}
|
|
@if(!empty($flight->departure_date))
|
|
|
|
<div class="flight-date">
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
تاریخ حرکت:
|
|
|
|
{{ $flight->departure_date }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- قیمت --}}
|
|
@if(!is_null($flight->price))
|
|
|
|
<div class="travel-price">
|
|
|
|
<i class="fa fa-money"></i>
|
|
|
|
{{ number_format((int) $flight->price) }}
|
|
|
|
تومان
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- جزئیات --}}
|
|
<a
|
|
href="{{ route('flights.show', $flight->id) }}"
|
|
class="travel-btn"
|
|
>
|
|
|
|
مشاهده جزئیات
|
|
|
|
<i class="fa fa-arrow-left"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@empty
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="empty-box text-center">
|
|
|
|
هنوز هیچ پرواز فعالی ثبت نشده است.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforelse
|
|
|
|
</div>
|
|
|
|
|
|
{{-- صفحهبندی پروازها --}}
|
|
@if($flights->hasPages())
|
|
|
|
<div class="pagination-wrapper">
|
|
|
|
{{ $flights->links() }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|