feat: add tour and flight detail logic to controllers

This commit is contained in:
2026-08-17 19:05:49 +03:30
parent 8fcc18fde9
commit c30b9f4550
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -29,6 +29,8 @@ class FlightController extends Controller
public function show(Flight $flight) public function show(Flight $flight)
{ {
$title = 'جزئیات پرواز'; $title = 'جزئیات پرواز';
return view('flights.show' , compact('title')); $flight = Flight::findOrFail($flight);
return view('flights.show' , compact('title' , 'flight'));
} }
} }
+3 -2
View File
@@ -25,9 +25,10 @@ class TourController extends Controller
return view('tours.index', compact('title', 'tours', 'sort')); return view('tours.index', compact('title', 'tours', 'sort'));
} }
public function show(Tour $tour) public function show(Tour $id)
{ {
$title= 'جزئیات تور'; $title= 'جزئیات تور';
return view('tours.show', compact('title')); $tour = Tour::findOrFail($id);
return view('tours.show', compact('title' , 'tour'));
} }
} }