Showing 7 of 2,041 result(s)
Throughout this article we will explore creating a system that will allow site visitors to leave "reactions" on Statamic 3 entries. Once complete, users will be able to add the following reactions to entries: 👍 Like, 😍 Love, 😯 Surprised, 🤔...
On a recent Statamic project I was continuously receiving the following error when attempting to view a collection's entries within the Statamic control panel: Digging through the error's vendor frames I ultimately landed on the following line...
The contains 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 modify the User class we...
Throughout this article we will be creating a Statamic modifier that provides similar functionality to PHP's compact function. This function will create an array from the provided variables by name. As a refresher, let's take a look at how the...
action($name, $parameters = [], $absolute = true) The action helper function can be used to generate a URL to a controller action, which is supplied as an argument to the $name parameter. If the controller action requires or accepts parameters...
If your project is utilizing tools like TailWind CSS that produce a production CSS build based on the classes your template files actually use, you may run into situations where some classes used on your custom error pages are not included in the...
implode($value, $glue = null) The implode method will combine the items of the collection together. The Collection 's implode method behaves differently than PHP's implode function in that it can operate on arrays of primitive data types as well...