Showing 10 of 2,055 results.

Why Rebuild the Site? | Rebuilding Stillat.com

…he most part). Essentially I needed to find something that made me want to write posts, as well as not make me feel frustrated while doing so. When you have grown to resent signing in to your own site something needs to change. In my search I...

Configuring Image Sizes | Configuration Overview

…, and their associated metadata, are configured within the images.php configuration file. Each configured social media image must have the following properties: handle, : A unique handle to internally represent the social media platform. This...

Laravel Miscellaneous Helper Function: trait_uses_recursive

…by: 1 <?php 2 3 $ traits = trait_uses_recursive ( ' ExampleClass ' ) ; The $traits variable would contain the following array: 1 array( 3 ) { 2 [ " TraitTwo " ] " TraitTwo " 3 [ " TraitThree " ] " TraitThree " 4 [ " TraitOne " ] " TraitOne " 5 }...

Laravel 5 Message Bags: Retrieving the First Message With first

The first method will return the first message in the MessageBag instance for a given $key . If the $key is null the first method will return the first message in the MessageBag instance. If there are no messages stored within the message bag, the...

Laravel String Helper Function: singular

The singular helper method is the logical opposite to the plural method: it will attempt to take a given $value and return the singular form of that word. The internal mechanisms are similar to the plural method. The signature for the singular...

Laravel 5: Resolving Authentication Policies With policy

…e either a string or an object instance. If no policies for the given $class have been registered with the application an instance of InvalidArgumentException will be thrown. The policy helper functions internally makes a call to the getPolicyFor...

Registering Default Metadata | Overview

In the previous code sample, we saw a call to the withDefaults method. This method will register a number of common metadata entries for us. Specifically, it is equivalent to the following: 1 <?php 2 3 use Stillat \ StatamicSiteEssentials \...

Generating Favicons

…ne and programmatically, such as from listening to Statamic events. Before we can generate favicons, we need to let Site Essentials for Statamic know what image to use as the source image. This is done by using the Favicon facade's getSourceUsing...