Showing 7 of 1,697 result(s)
The before method can be used to return a part of a string before the first occurrence of a $search character. This method can be used to help parse URL query strings, or to quickly find substrings based on a certain character; it is the logical...
The signature of the addNamespace method is: The parameters of this method match the parameters of the loader's addNamespace method.
The resolve helper function can be used to resolve a class instance form the Service Container. This function is typically used with named instances, but can be used to resolve any dependency from the Service Container as long as its constructor...
The pluck method is used to retrieve the a list of values from the collection. It defines two parameters: $value and $key . The $value indicates which property should become the value in the resulting collection and the $key parameter indicates...
The call and callSilent commands discussed in the previous section are defined as part of the Artisan Command base class, which is not incredibly useful when commands need to be executed from other locations within the application's code base....
The flatten helper method is similar to the dot method in that it takes a multi-dimensional array and transforms it into a new array with only one dimension. While the dot method preserves the keys by separating them with dots , the flatten method...
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...