Showing 10 of 2,133 results.

Creating a Hybrid Cache System for Statamic: Part Two

In this section, we will work to implement one of the more impressive aspects 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...

Laravel 5 Collections: The Public API

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

Creating a Hybrid Cache System for Statamic: Part Four

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

Custom Command Styles With Laravel Artisan

Since Laravel's console application and commands are built on top of the Symfony console component, we can use Symfony's console style system within our Laravel commands. Styles are used to control the background and foreground colors of text that...

Laravel Task Scheduling: Running the Task Scheduler

In this article we will explore the various ways to run the Laravel task 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...

Laravel Collection Public API: contains

contains($key, $value = null) The contains method is used to determine if a given $key exists within the collection. Additionally, an option $value can be specified that will be used to check if a given key/value pair exists within the collection....