Quick tip on how to use cache in Laravel

You can easily cache a database query or any other data in the HTTP requests with Laravel’s Cache facade. The closure function passed to the remember method will be used if the cache doesn’t exist. See the example below: