Showing 7 of 1,975 result(s)
Taking a look at the current state of our Antlers partial, we can see a lot of duplicate code starting to emerge. This problem will only get worse over time since we will be referencing those field names in a few places: once to create the buttons...
…sed Reactions surprised_reactions Thinking Reactions thinking_reactions Sad Reactions sad_reactions Angry Reactions angry_reactions After all six fields have been created, and the fieldset has been saved, the resources/fieldsets/reactions.yaml...
Like with many of the translator's public methods, we can specify the locale when calling the choice method via an argument to the $locale parameter. By default, Laravel will use the default configured locale when you invoke the choice method. 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...
…rendering a template based on an entry's blueprint and collection , with support for a fallback default template. Example use-cases: Selecting templates dynamically to generate social media images from HTML,, Generating HTML documents on-the-fly,...
Now if we move over to our controller, we actually need to implement the getShowResults() function. Important : It should be noted that the above code assumes you have building the paginated collections manually. $pagedData would be the current...
We are going to create a custom exception class just to observe how our template variables change depending on the type of error that was thrown. To do this, create a new PHP file at app/CustomException.php with the following contents: Now that...