feat: add flights and tours frontend views

This commit is contained in:
2026-08-17 08:04:48 +03:30
parent 9b70b8efd7
commit 1a12dbc15c
4 changed files with 62 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
<div>
<!-- Very little is needed to make a happy life. - Marcus Aurelius -->
</div>
+3
View File
@@ -0,0 +1,3 @@
<div>
<!-- Simplicity is an acquired taste. - Katharine Gerould -->
</div>
+18
View File
@@ -0,0 +1,18 @@
@extends('layouts.app')
@section('title', 'لیست تورها')
@section('content')
<h1>تورهای ما</h1>
<div class="row">
@forelse($tours as $tour)
<div class="col-md-4">
<x-tour :tour="$tour"/>
</div>
@empty
<p>تور فعالی یافت نشد.</p>
@endforelse
</div>
{{ $tours->links() }}
@endsection
+38
View File
@@ -0,0 +1,38 @@
@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