Showing 7 of 1,975 result(s)
Earlier in this article, I briefly mentioned that Statamic will first render the template and inject the rendered template's contents into the layout via. a template_contents variable. This behavior can sometimes make it non-obvious to pass...
…o do most of the heavy lifting for us: composer require stillat/blade-parser After installing both packages, we can run the following command to publish Volt's service provider, which we will use later to modify some paths: php artisan...
…output in some container element. For example, the following Antlers template surrounds our dynamic output in an unordered list: Example 1.8 Our approach in Example 1.8 works well if we don't mind the wrapper elements always appearing in the...
To do this, let's create a view composer. From the Laravel doc's this is a view composer: View composers are callbacks or class methods that are called when a view is rendered. If you have data that you want bound to a given view each time that...
The following table will list every framework class that implements the __call method directly. The table will also indicate if the class supports macros even though it implements __call . Please note that the following table does not take into...
We can access array data directly by its index in many different ways. The first and most recognizable is by using the square bracket syntax. We will use the sample data in Example 1.20 for our discussions: Example 1.20 If we already know the...
Now that we have an empty tag addon class to work with, let's quickly recap what we want this addon tag to do: what we want to be able to do is determine if a URL query parameter exists. The first thing that I like to do is decide how the addon...