Showing 7 of 1,975 result(s)
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#...
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...
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:
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...
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...
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...
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...