Showing 7 of 1,697 result(s)
The SORT_NUMERIC treats each item as a number when doing the comparison. The following code example shows how to use the SORT_NUMERIC flag when sorting the $collection created previously (the callback function will return the string representation...
The SORT_STRING treats each item as a string when doing the comparison. The following code example shows how to use the SORT_STRING flag when sorting the $collection created previously (the callback function will return the string representation...
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...
The unwrap method is the logical opposite of the wrap method, in that if the provided value is already a collection, the collection's underlying items will be returned. If the provided value is not a collection instance, the value is simply...
The flip method will return a new Collection instance where are the all the collection item's keys have been exchanged with their corresponding values. The behavior of the flip method is similar to PHP's array_flip function.public function...
The every method can also be used with higher order messaging, which allows us to invoke collection methods and access properties on objects using PHP's property accessors syntax. In the following example, we will create a color class with a...
From the root of your Statamic 3 project, run the following Artisan command: php artisan make:migration create_password_activations_table Once this has completed, locate a new file that ends with _create_password_activations_table.php within your...