fix: dynamic tours details view and null-safe relations
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user