Showing 7 of 1,975 result(s)
chunk($size, $preserveKeys = false) 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...
Step 0 is a thing right? It is on this website. The first thing we need to do is figure out exactly how you mark up a paginator in Semantic UI. This can be done by referring to the Semantic UI documentation for the menu collection, which can be...
The push method is the logical opposite of the prepend method and will push an item onto the end of the collection. The push method returns a reference to the original collection instance. The push method modifies the collection instance it was...
The flatMap method can be used with higher order messaging, which allows us to invoke collection methods and access object instance properties using PHP's property accessors syntax. In the reject and partition sections, we created the following...
…ion's entries within the Statamic control panel: Digging through the error's vendor frames I ultimately landed on the following line within vendor/statamic/cms/src/Http/Controllers/CP/Collections/CollectionController.php : This sent me down a...
The reject method can also be used with higher order messaging, which allows us to invoke collection methods and access properties on objects using PHP's property accessors syntax. In the following example, we will create a simple Product class...
The trans method is similar to the get method, and can be used in a similar way. The difference between the two methods is that the trans method does not allow you to change the fallback locale behavior, and defaults to always using the fallback...