applySearch() ->take(10) ->get(); $flights = Flight::latest()-> paginate(9); return view('home.index', compact('newestFlight', 'flights')); } public function show(Flight $flight) { $flight->increment('views'); return view('flights.show', compact('flight')); } }