Search

Showing 7 of 1,975 result(s)

/blog/2021/12/12/creating-a-content-reaction-system-with-statamic-3-and-antlers#content-refactoring-our-partial-using-antlers-front-matter

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...

/blog/2021/12/12/creating-a-content-reaction-system-with-statamic-3-and-antlers#content-data-storage-creating-a-fieldset-and-updating-the-blog-blueprint

…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...

/blog/2018/02/20/laravel-5-string-translation-public-api#content-specifying-the-locale

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...

/blog/2021/11/07/creating-a-statamic-compact-modifier

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...

/template-resolver-for-statamic/v1/installation-and-overview

…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,...

/blog/2014/07/28/laravel-paginator-pretty-urls#content-the-controller-function

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...

/blog/2021/09/12/creating-a-customized-statamic-3-500-error-page#content-creating-a-custom-exception-class

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...