Showing 7 of 1,975 result(s)
…ts of our custom cache system: invalidating cached content if any of the templates used to create the response have been modified or removed. Before diving into all of the required code changes, let's think through the things we will need to do:...
…ers as constants. We could simply write them as strings each time we need them in our code, but it is easy to make a mistake that way once things get going. We will build on the code that we started the article with: To start, we are going to...
The Collection class exposes a generous public API, consisting of many public methods that allow you to manipulate and transform the collections internal elements. The Collection API exposes methods for retrieving values from a collection,...
…sk scheduler. We will look at running the task scheduler on Mac OS as well as on Windows. There are two major ways to run the task scheduler. The first is to manually run the scheduler using the schedule:run Artisan command: php artisan...
In the last section, we explored the relative response times of different Statamic caching strategies and experimented with the response times of short-circuiting both Laravel and Statamic. We also discovered that the response times resulting from...
…ample would also set the background color to yellow . Note that each property is separated by a semicolon. It is also possible to only style certain sections of the message (line breaks have been added to improve readability of the code sample):...
In this section, we will work to implement the ability to set custom cache expiration durations from within our templates. The logic will be straightforward: We will provide utility methods, create an Antlers tag to specify a custom expiration,...