feat: add flights and tours frontend views
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Very little is needed to make a happy life. - Marcus Aurelius -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is an acquired taste. - Katharine Gerould -->
|
||||
</div>
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user