latest() ->paginate(3); $tours = Tour::with('travelType') ->latest() ->paginate(2); return view('tours.index', compact('tours')) ->with('withoutHero', true); } public function show(Tour $tour) { $tour->load('travelType'); $tour->increment('views'); $cacheKey = 'tour_views:' . $tour->id . ':' . now()->format('Y-m-d'); Cache::put($cacheKey, Cache::get($cacheKey, 0) + 1, now()->addDays(15)); $comments = $tour->comments() ->latest() ->get(); return view('tours.show', compact('tour','comments')); } }