feat: add tour and flight detail logic to controllers
This commit is contained in:
@@ -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'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user