Showing 10 of 2,133 results.

SORT_LOCALE_STRING | Laravel Collection Public API: sortBy

The SORT_LOCALE_STRING treats each item as a string, while also taking into account the current locale, when doing the comparison. The following code example shows how to use the SORT_LOCALE_STRING flag when sorting the $collection created...

Laravel Collection Public API: shift

shift The shift method is used to remove the first item from the collection and return its value. The shift method modifies the collection instance. The following code example shows how to use the shift method: 1 <?php 2 3 use Illuminate \ Support...

Laravel Miscellaneous Helper Function: value

value($value) The value function will return the default value of the supplied $value . Although this sounds redundant, if the supplied $value is an instance of the Closure class, the function will be executed and the value will be returned. If...

Laravel Collection Public API: intersect

intersect($items) The intersect removes any values that are not in the provided $items array. The intersect method returns a new instance of Collection . The intersect method preserves any keys from the original collection. The following code...

The where Filter | The "where" Filters

The where filter accepts a comment property, a comparison operator, and a check value as its arguments. You may refer to the comment properties documentation to see what is available when using this filter (custom addon values are also supported)....

Integrating Laravel Spark, Stripe, and Statamic 3

Throughout this article we will create a fairly basic integration between Statamic 3 and the newly updated Laravel Spark . This guide will be using Spark's Stripe option, but if you want to use Paddle, the overall steps should not be too...

Notes on Decimals | Laravel String Pluralization

In the previous example, trying to match the number 3.4 will throw an instance of InvalidArgumentException . To match any possible number, including decimals, for the previous translation messages, the explicit number groups must be replaced with...