401 lines
14 KiB
PHP
401 lines
14 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
|
|
<div class="tour-details-page">
|
|
|
|
<div class="container">
|
|
|
|
<div class="tour-details-card">
|
|
|
|
{{-- تصویر تور --}}
|
|
<div class="tour-details-image">
|
|
|
|
@if($tour->image)
|
|
|
|
<img
|
|
src="{{ asset('storage/' . $tour->image) }}"
|
|
alt="{{ $tour->title }}"
|
|
>
|
|
|
|
@else
|
|
|
|
<div class="tour-no-image">
|
|
تصویر برای این تور ثبت نشده است
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
{{-- محتوای تور --}}
|
|
<div class="tour-details-content">
|
|
|
|
{{-- عنوان --}}
|
|
<h1 class="tour-details-title">
|
|
{{ $tour->title }}
|
|
</h1>
|
|
|
|
|
|
{{-- اطلاعات اصلی --}}
|
|
<div class="tour-details-info">
|
|
|
|
{{-- نوع سفر --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
نوع سفر
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $tour->travelType->title ?? 'نامشخص' }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- تاریخ شروع --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
تاریخ حرکت
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $tour->start_date
|
|
? \Carbon\Carbon::parse($tour->start_date)->format('Y/m/d')
|
|
: 'نامشخص'
|
|
}}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- تاریخ پایان --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
تاریخ پایان
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $tour->end_date
|
|
? \Carbon\Carbon::parse($tour->end_date)->format('Y/m/d')
|
|
: 'نامشخص'
|
|
}}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- مدت سفر --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
مدت سفر
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $tour->duration ?? 'نامشخص' }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- قیمت --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
قیمت
|
|
</span>
|
|
|
|
<strong>
|
|
{{ number_format($tour->price) }}
|
|
تومان
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- ظرفیت --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
ظرفیت
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $tour->capacity ?? 'نامحدود' }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- تعداد بازدید --}}
|
|
<div class="tour-info-box">
|
|
|
|
<span class="tour-info-label">
|
|
تعداد بازدید
|
|
</span>
|
|
|
|
<strong>
|
|
{{ number_format($tour->views_count) }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
{{-- توضیحات --}}
|
|
<div class="tour-description">
|
|
|
|
<h2>
|
|
توضیحات سفر
|
|
</h2>
|
|
|
|
@if($tour->description)
|
|
|
|
<p>
|
|
{{ $tour->description }}
|
|
</p>
|
|
|
|
@else
|
|
|
|
<p>
|
|
توضیحی برای این تور ثبت نشده است.
|
|
</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
{{-- پروازهای تور --}}
|
|
@if($tour->flights && $tour->flights->count())
|
|
|
|
<div class="tour-flights">
|
|
|
|
<h2>
|
|
پروازهای این تور
|
|
</h2>
|
|
|
|
@foreach($tour->flights as $flight)
|
|
|
|
<div class="flight-item">
|
|
|
|
<div>
|
|
|
|
<span>
|
|
مبدأ
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $flight->origin ?? '-' }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
<span>
|
|
مقصد
|
|
</span>
|
|
|
|
<strong>
|
|
{{ $flight->destination ?? '-' }}
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- تورهای مرتبط --}}
|
|
@if($relatedTours->count())
|
|
|
|
<div class="related-tours">
|
|
|
|
<h2>
|
|
تورهای مرتبط
|
|
</h2>
|
|
|
|
<div class="related-tours-grid">
|
|
|
|
@foreach($relatedTours as $relatedTour)
|
|
|
|
<a
|
|
href="{{ route('tours.show', $relatedTour) }}"
|
|
class="related-tour-card"
|
|
>
|
|
|
|
@if($relatedTour->image)
|
|
|
|
<img
|
|
src="{{ asset('storage/' . $relatedTour->image) }}"
|
|
alt="{{ $relatedTour->title }}"
|
|
>
|
|
|
|
@endif
|
|
|
|
<div>
|
|
|
|
<h3>
|
|
{{ $relatedTour->title }}
|
|
</h3>
|
|
|
|
<span>
|
|
@if($relatedTour->start_date)
|
|
{{ \Carbon\Carbon::parse($relatedTour->start_date)->format('Y/m/d') }}
|
|
@endif
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
{{-- دکمه بازگشت --}}
|
|
<div class="tour-back">
|
|
|
|
<a
|
|
href="{{ route('tours.index') }}"
|
|
class="tour-back-button"
|
|
>
|
|
بازگشت به لیست تورها
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
{{-- resources/views/tours/show.blade.php --}}
|
|
{{--@extends('layouts.app')--}}
|
|
|
|
{{--@section('title', $tour->name)--}}
|
|
|
|
{{--@section('content')--}}
|
|
{{-- <div class="container py-5 mt-4">--}}
|
|
|
|
{{-- --}}{{-- اطلاعات تور --}}
|
|
{{-- <div class="card mb-4 shadow-sm">--}}
|
|
{{-- <div class="card-body">--}}
|
|
{{-- <h2 class="card-title">{{ $tour->name }}</h2>--}}
|
|
{{-- <p class="text-muted">{{ $tour->description }}</p>--}}
|
|
{{-- <hr>--}}
|
|
{{-- <div class="row">--}}
|
|
{{-- <div class="col-md-3"><strong>مبدأ:</strong> {{ $tour->origin->name ?? '—' }}</div>--}}
|
|
{{-- <div class="col-md-3"><strong>مقصد:</strong> {{ $tour->destination->name ?? '—' }}</div>--}}
|
|
{{-- <div class="col-md-3"><strong>تاریخ رفت:</strong> {{ $tour->start_date }}</div>--}}
|
|
{{-- <div class="col-md-3"><strong>بازگشت:</strong> {{ $tour->end_date }}</div>--}}
|
|
{{-- </div>--}}
|
|
{{-- <div class="row mt-3">--}}
|
|
{{-- <div class="col-md-4"><strong>قیمت:</strong> {{ number_format($tour->price) }} تومان</div>--}}
|
|
{{-- <div class="col-md-4"><strong>ظرفیت:</strong> {{ $tour->capacity }} نفر</div>--}}
|
|
{{-- <div class="col-md-4"><strong>موجودی:</strong> {{ $tour->available_seats ?? $tour->capacity }} نفر--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- <hr>--}}
|
|
{{-- <p>{{ $tour->description }}</p>--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- </section>--}}
|
|
|
|
{{-- --}}{{-- ===== فرم رزرو تور ===== --}}
|
|
{{-- @auth--}}
|
|
{{-- <section class="pb-5">--}}
|
|
{{-- <div class="container">--}}
|
|
{{-- <div class="card shadow-sm">--}}
|
|
{{-- <div class="card-header bg-success text-white">--}}
|
|
{{-- رزرو تور {{ $tour->name }}--}}
|
|
{{-- </div>--}}
|
|
{{-- <div class="card-body">--}}
|
|
{{-- <form action="{{ route('booking.store', $tour) }}" method="POST">--}}
|
|
{{-- @csrf--}}
|
|
{{-- <div class="mb-3">--}}
|
|
{{-- <label class="form-label">تعداد نفرات</label>--}}
|
|
{{-- <input type="number" name="seats" min="1" max="{{ $tour->capacity }}" value="1"--}}
|
|
{{-- class="form-control @error('seats') is-invalid @enderror" required>--}}
|
|
{{-- @error('seats')--}}
|
|
{{-- <span class="invalid-feedback">{{ $message }}</span>--}}
|
|
{{-- @enderror--}}
|
|
{{-- </div>--}}
|
|
{{-- <button type="submit" class="btn btn-success w-100">رزرو تور</button>--}}
|
|
{{-- </form>--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- </section>--}}
|
|
{{-- @else--}}
|
|
{{-- --}}{{-- کاربر لاگین نیست => دکمه ورود به روت login --}}
|
|
{{-- <div class="alert alert-warning text-center">--}}
|
|
{{-- برای رزرو تور ابتدا <a href="{{ route('login') }}">وارد شوید</a>.--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- @endauth--}}
|
|
{{--@endsection--}}
|
|
|
|
|
|
{{--@extends('layouts.app')--}}
|
|
|
|
{{--@section('content')--}}
|
|
{{-- <h1>{{ $tour->title }}</h1>--}}
|
|
|
|
{{-- --}}{{----}}{{-- گالری تصاویر (اسلایدر) --}}
|
|
{{-- <div id="tourGallery" class="carousel slide" data-bs-ride="carousel">--}}
|
|
{{-- @foreach ($tour->images as $image)--}}
|
|
{{-- <div class="carousel-item @if($loop->first) active @endif">--}}
|
|
{{-- <img src="{{ $image->path }}" class="d-block w-100" alt="">--}}
|
|
{{-- </div>--}}
|
|
{{-- @endforeach--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- <p>{{ $tour->description }}</p>--}}
|
|
{{-- <p>تاریخ شروع: {{ $tour->start_date?->format('Y/m/d') }}</p>--}}
|
|
|
|
{{-- --}}{{----}}{{-- پروازهای این تور --}}
|
|
{{-- <h3>پروازهای همراه</h3>--}}
|
|
{{-- @foreach ($tour->flights as $flight)--}}
|
|
{{-- <x-flight :flight="$flight"/>--}}
|
|
{{-- @endforeach--}}
|
|
|
|
{{-- --}}{{----}}{{-- نظرات --}}
|
|
{{-- <h3>نظرات ({{ $tour->comments->count() }})</h3>--}}
|
|
{{-- @foreach ($tour->comments as $comment)--}}
|
|
{{-- <x-comment :comment="$comment"/>--}}
|
|
{{-- @endforeach--}}
|
|
|
|
{{-- @auth--}}
|
|
{{-- <form method="POST" action="{{ route('comments.store', $tour) }}">--}}
|
|
{{-- @csrf--}}
|
|
{{-- <textarea name="body" required></textarea>--}}
|
|
{{-- <button type="submit">ثبت نظر</button>--}}
|
|
{{-- </form>--}}
|
|
{{-- @endauth--}}
|
|
{{--@endsection--}}
|
|
|