Search

Showing 7 of 1,975 result(s)

/blog/2023/09/03/creating-a-hybrid-cache-system-for-statamic-part-five

…Cache/Providers/HybridCacheServiceProvider.php : The changes to our cache manager will seem rather extensive, but they all help achieve the same goal: keep track of the unique label namespaces and labels for the current request, with a few helper...

/blog/2018/04/22/laravel-5-collections-static-api-creating-a-collection-by-invoking-a-callback-a-given-number-of-times-with-times

The times static method is similar to PHP's range function, with some extra functionality specific for collections. The times method accepts a $number argument as well as an optional $callback function. The argument supplied for the $number...

/blog/2021/12/05/creating-stacked-content-layouts-with-statamic-and-antlers#content-using-the-limit-and-offset-modifiers-together

We can use Statamic's offset and limit modifiers together to achieve the same results. When applied to arrays, the limit modifier can be used to control the total number of items you want to retrieve from the array. As an example, the following...

/meerkat/the-comment-thread

…on, we will look at building the comment thread on your actual website so other users can view submitted comments. We will continue utilizing the Cool Writings Statamic starter kit. While Meerkat's collection syntax is very close to Statamic's,...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-with-wherenotin

The whereNotIn method will return all of the items in a collection that do not have matching values (supplied via the $values parameter) for the provided $key . This method is capable of filtering collections of both arrays and objects. The...

/blog/2018/04/22/laravel-5-collections-pair-the-values-of-a-collection-with-the-values-of-other-collections-with-zip

The zip method is used to merge the values of two collections. The first collection will be the collection that the zip method was invoked on, the second collection is supplied as an argument. The zip method produces results that are similar to...

/blog/2018/04/22/laravel-5-collections-splitting-a-collection-into-smaller-pieces-with-chunk

The chunk method is useful when working with large collections in that it allows developers to create smaller collections to work with. The chunk method defines two parameters: $size , which is used to control how large each newly created...