diff --git a/app/Http/Controllers/TourController.php b/app/Http/Controllers/TourController.php index 0a6d242..f0d0eac 100644 --- a/app/Http/Controllers/TourController.php +++ b/app/Http/Controllers/TourController.php @@ -25,10 +25,11 @@ class TourController extends Controller return view('tours.index', compact('title', 'tours', 'sort')); } - public function show(Tour $id) + public function show(Tour $tour) { $title= 'جزئیات تور'; - $tour = Tour::findOrFail($id); + $tour->load(['file', 'originCity', 'city', 'tourDepartures', 'comments.user']); + return view('tours.show', compact('title' , 'tour')); } } diff --git a/resources/views/components/tour-card.blade.php b/resources/views/components/tour-card.blade.php index 7fea367..c3c698b 100644 --- a/resources/views/components/tour-card.blade.php +++ b/resources/views/components/tour-card.blade.php @@ -21,7 +21,7 @@ {{ number_format(optional($tour->tourDepartures->first())->price ?? 0) }} تومان
diff --git a/resources/views/tours/partials/main.blade.php b/resources/views/tours/partials/main.blade.php index d6afed8..c45332e 100644 --- a/resources/views/tours/partials/main.blade.php +++ b/resources/views/tours/partials/main.blade.php @@ -1,52 +1,269 @@ -{{-- resources/views/flights/partials/main_content.blade.php --}}سفر یک طرفه 1 توقف
-سفر {{ $tour->tour_type }}
+ {{ $departure && $departure->start_date ? Verta::instance($departure->start_date)->format('Y/m/d - H:i') : 'نامشخص' }} +
++ {{ $departure && $departure->end_date ? Verta::instance($departure->end_date)->format('Y/m/d - H:i') : 'نامشخص' }} +
+