Showing 7 of 1,975 result(s)
The count method will return the number of elements contained within the collection's inner array; it is synonymous with PHP's count function.public function count();The count method is a straightforward method and simply returns the total number...
The nth method returns a new collection containing the elements of the original collection that appear at the $step interval (for example, give me every third element within the collection). An $offset may also be specified to indicate which index...
The following examples will demonstrate how to make equivalent calls between the trans and the get method. For more detailed explanation of each of the parameters, see the section on the get method. In the following example, we will use the trans...
Suppose we want to use our honeypot mechanism across multiple forms. Adding the hidden form input field to each form might become tedious. To help with this, we can create a custom Blade directive to simplify this process. In our...
As we saw in the Basic Filtering guide, we can supply input to our comment filters: When there are only a few values, this can be maintained easily within the template. However, with Meerkat comment filters, you can inject values into the filter....
…ne and programmatically, such as from listening to Statamic events. Before we can generate favicons, we need to let Site Essentials for Statamic know what image to use as the source image. This is done by using the Favicon facade's getSourceUsing...
…ue is. We can do that by using this little code snippet: Notice that undefined is in quotes. That is because the typeof operator will return a string. Just a little piece of information for the tool belt. The inverse of this is: Do note that this...