once() helper function

once() helper function in Laravel

In a nutshell, once() helper function of Laravel runs the codes inside it’s callback only once in a request lifecycle and caches it so that when you make another call later it will return the cached value instead of running the codes inside the callback again. Let’s see that in more details with some examples

Cache::flexible() method of Laravel

Cache::flexible(): Best way to cache in Laravel

Caching large set of data that has been computed before is always a good idea to make your website faster and one of the most common things we as developer do is using the remember() method of Cache class, but there are some problems with this approach that Laravel fixed. In this post, we will