Showing 7 of 1,697 result(s)
…in the string, or even create an array containing all the string's characters. The following example would return the upper-cased version of the value Hello, world! : The input value for modifiers always come from the left. Modifiers can also...
Our first example will be to create our middleware to check for the presence and value of the honeypot field. If the honeypot field is not empty, the middleware will block the request and return a 403 Forbidden response. Depending on your...
…a single value, or another collection of items. The behavior of the mapToDictionary method ensures that all key/value pairs contain an array as the value, even if the value contains one element. The mapToDictionary method defines a single...
…roups and mapToDictionary methods is that, unlike the mapToDictionary method, the mapToGroups will create collections for each key's values (the mapToDictionary creates arrays for each key's values). The mapToGroups method defines a single...
Let's add properties and methods to our Layout tag inside src/Tags/Layout.php and work through what each part is doing. First, the public methods, index and wildcard , are how we will interact with our custom Tag within an Antlers template. If we...
…class. At this point the service provider looks like this: The following example will register a new format definition with the progress bar helper. To register or override a format definition we need to supply the name (via an argument to the...
…display spam or pending comments; if your comment does not appear you should try approving it first from the Statamic Control Panel. Congratulations! You've successfully implemented the Meerkat comment system on your Statamic site with daylight...