I am looking for some way to create cache for the existing data I have in laravel db. I have searched around the web. There are plenty of tips on how to enable caching for new data but none for existing. Example would be a large number of products for sale that are in my inventory database. A good example would be the controller function below. How can I cache this query? $hotel is the json response.
public function gethotels(Request $request) {
$hotels = DB::table('hotel')->get();
return $hotels;
}