Search

Showing 7 of 1,697 result(s)

/blog/2018/04/22/laravel-5-collections-calculating-the-average-value-of-a-collection-with-avg#content-signature

…fairly simple, and in most cases the collections will be more complicated. For example, consider the following sample collection of products: We can calculate the average price of all items in the collection by simply passing in a value for the...

/blog/2018/04/11/laravel-5-conditionally-retrieving-array-values-with-where#content-example-use

In the following example, we will examine how to compare just the values of the arrays. Assume we have an array of numbers, from 0 to 100 : $numbers = range(0, 100); An array of all numbers less than or equal to 10 can be created like so:...

/site-essentials-for-statamic/v1/manifest-configuration

The details used to generate your site's site.webmanifest file are contained within the site_essentials/webmanifest.php configuration file. Because of the large amount of options available when creating a manifest file, and the various...

/blog/2014/06/25/lambdas-and-closures#content-lambdas-as-function-arguments

…ble argument. The first thing we have to do is define what our function is going to do. Our function will be a simple utility function called if_null_then . It will check if a value is null , if it is, then it returns a default value $then , or...

/blog/2018/02/20/laravel-5-string-translation-public-api#content-example-use-3

…confusing at first. The method call returns true even though there is no es locale by default. The method call returns true because Laravel supports a fallback locale, which will be used to look up translations if a translation does not exist for...

/site-essentials-for-statamic/v1/antlers-tags

…aspect of site development. Some tags are a bit obscure, but some are generally applicable to many types of projects. se_capture Tag, The se_capture tag can be used to store the results of a template section, and output it later as a string. This...

/blog/2016/11/30/laravel-collection-public-api-where

…e = null) The where method allows developers to filter a collection given a key value pair. It filters the collection's items by checking that the given $key has some value equal to the provided $value . An argument can be supplied for the...