From ad6d2cc60a48fc8f0c0e1762a877af9bbd959b65 Mon Sep 17 00:00:00 2001 From: Bahar Date: Mon, 17 Aug 2026 11:58:37 +0330 Subject: [PATCH] feat:implement layouts for flight details --- resources/views/flights/show.blade.php | 130 ++++++++++++++++++ .../views/show-layouts/breadcrumb.blade.php | 15 ++ .../views/show-layouts/reviews.blade.php | 84 +++++++++++ .../views/show-layouts/sidebar.blade.php | 67 +++++++++ 4 files changed, 296 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..9803b30 --- /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', [ + 'flight' => $flight, + '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..73c0059 --- /dev/null +++ b/resources/views/show-layouts/breadcrumb.blade.php @@ -0,0 +1,15 @@ + +@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..d5828d4 --- /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..910fb6f --- /dev/null +++ b/resources/views/show-layouts/sidebar.blade.php @@ -0,0 +1,67 @@ +
+
+
+
+

قیمت هر نفر

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