Search

Showing 7 of 1,975 result(s)

/blog/2018/04/21/laravel-5-macros

Macros are a way to reduce the lines of code a developer has to write, and can be traditionally thought of as "shortcuts". Laravel generally uses macros to add, or inject, functionality into various classes at runtime. Developers familiar with C#...

/blog/2018/04/22/laravel-5-collections-determining-if-a-collection-contains-an-element-with-contains

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

/blog/2018/04/22/laravel-5-collections-determining-if-a-collection-has-an-element-with-has

The has method is used to determine if a item exists in the collection based on a given $key . The has method returns true if the item exists and false if it does not.The following example demonstrates the usage of the has method:

/blog/2018/04/22/laravel-5-collections-sorting-a-collection-based-on-a-key-value-with-sortby#content-sortstring-and-sortflagcase-flags-for-case-insensitivity

The SORT_FLAG_CASE flag can be combined with the SORT_STRING flag to treat each item as a string while also ignored the case of each item. The following example shows how to use the SORT_STRING with the SORT_FLAG_CASE flag when sorting the...

/blog/2018/04/22/laravel-5-collections-sorting-a-collection-based-on-a-key-value-with-sortby#content-the-sortnatural-flag

The SORT_NATURAL treats each item as a string while using a "natural ordering" algorithm to perform the sorting. The following code example shows how to use the SORT_NATURAL flag when sorting the $collection created previously (the callback...

/blog/2018/04/22/laravel-5-collections-sorting-a-collection-based-on-a-key-value-with-sortby#content-the-sortnatural-and-sortflagcase-flags-for-case-insensitivity

The SORT_FLAG_CASE flag can be combined with the SORT_NATURAL flag to treat each item as a string while also ignored the case of each item. The following example shows how to use the SORT_NATURAL with the SORT_FLAG_CASE flag when sorting the...

/meerkat/integrating-meerkat#content-getting-started

In this guide, we will be integrating Meerkat into the Cool Writings Statamic starter kit. To get a sense of what we are going to build, we are going to add a comment section the article page: We will start by modifying the...