From ef6ac6394af4938d4bb47e2a0623b1987fdb7c71 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 17 Aug 2026 13:09:53 -0700 Subject: [PATCH] feat: complete shows layout in user side --- resources/views/flights/show.blade.php | 130 ++++++++++++++++++ .../views/show-layouts/breadcrumb.blade.php | 22 +++ .../views/show-layouts/reviews.blade.php | 84 +++++++++++ .../views/show-layouts/sidebar.blade.php | 86 ++++++++++++ 4 files changed, 322 insertions(+) create mode 100644 resources/views/flights/show.blade.php create mode 100644 resources/views/show-layouts/breadcrumb.blade.php create mode 100644 resources/views/show-layouts/reviews.blade.php create mode 100644 resources/views/show-layouts/sidebar.blade.php diff --git a/resources/views/flights/show.blade.php b/resources/views/flights/show.blade.php new file mode 100644 index 0000000..b6a826d --- /dev/null +++ b/resources/views/flights/show.blade.php @@ -0,0 +1,130 @@ +@extends('layouts.app') + +@section('content') + +
+ + @include('show-layouts.breadcrumb', [ + 'title' => 'جزئیات پرواز', + 'current' => $flight->departureAirport->city->name.' - '.$flight->arrivalAirport->city->name, + ]) + +
+
+
+
+
+
+ + + +
+
+

+ {{ $flight->departureAirport->city->name }} + + {{ $flight->arrivalAirport->city->name }} +

+

{{ $flight->airline->name }}

+
+
+ +
+
+
+
+ +
+
+
پرواز برخاست
+

{{ $flight->departure_time->toJalali()->format('l، j F Y | H:i') }}

+ {{ $flight->departureAirport->name }} ({{ $flight->departureAirport->code }}) +
+
+
+
+
+
+
+ +
+
+
فرود پرواز
+ {{ $flight->arrivalAirport->name }} ({{ $flight->arrivalAirport->code }}) +
+
+
+
+ +
+
+
+
+
+ +
+
+
خطوط هوایی
+ {{ $flight->airline->name }} +
+
+
+
+
+
+ +
+
+
ظرفیت پرواز
+ {{ number_format($flight->capacity) }} صندلی +
+
+
+
+
+
+ +
+
+
تاریخ حرکت
+ {{ $flight->departure_time->toJalali()->format('Y/m/d') }} +
+
+
+
+
+
+ +
+
+
بازدید این پرواز
+ {{ number_format($flight->views) }} بازدید +
+
+
+
+
+ + @if($flight->summary) +
+

درباره این پرواز

+

{{ $flight->summary }}

+
+ @endif + + @include('show-layouts.reviews', ['comments' => $flight->comments]) + +
+
+ + @include('show-layouts.sidebar') +
+ +
+
+
+ +
+@endsection diff --git a/resources/views/show-layouts/breadcrumb.blade.php b/resources/views/show-layouts/breadcrumb.blade.php new file mode 100644 index 0000000..da0b5ca --- /dev/null +++ b/resources/views/show-layouts/breadcrumb.blade.php @@ -0,0 +1,22 @@ +{{-- + Shared page breadcrumb. + + Props: + - string $title Heading shown in the breadcrumb band. + - string $current Label for the active (last) breadcrumb item. Defaults to $title. + - string $background Path (relative to /assets) used as the band background image. +--}} +@php + $current = $current ?? $title; + $background = $background ?? 'assets/img/breadcrumb/01.jpg'; +@endphp + + diff --git a/resources/views/show-layouts/reviews.blade.php b/resources/views/show-layouts/reviews.blade.php new file mode 100644 index 0000000..389df46 --- /dev/null +++ b/resources/views/show-layouts/reviews.blade.php @@ -0,0 +1,84 @@ +
+

بررسی‌ها

+ +
+ +
بازخوردها
+ + @forelse($comments as $comment) +
+ +
+ + +
+
+
+ {{ $comment->user->first_name }} + {{ $comment->user->last_name }} +
+ + + + {{ $comment->created_at->toJalali()->format('Y/m/d') }} + +
+
+
+ +

{{ $comment->comment }}

+ +
+ @empty +

هنوز بازخوردی ثبت نشده است. اولین نفری باشید که نظر می‌دهد.

+ @endforelse + +
+ +
+

نظر بدهید

+ +
+ @csrf + + @guest +
+ +
+ +
+ +
+ @endguest + +
+ +
+ + +
+
+
diff --git a/resources/views/show-layouts/sidebar.blade.php b/resources/views/show-layouts/sidebar.blade.php new file mode 100644 index 0000000..3cec909 --- /dev/null +++ b/resources/views/show-layouts/sidebar.blade.php @@ -0,0 +1,86 @@ +
+
+
+
+

قیمت هر نفر

+
+ از {{ number_format($flight->price) }} تومان +
+
+
+
+ @csrf +
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+ +
+
+
+ + افزودن به علاقه‌مندی‌ها +
+
+
+
+
+ {{ number_format($flight->views) }} مشاهده +
+
+
+