Showing 10 of 1,089 results.

Laravel Application Helper: auth

auth($guard = null) Used without supplying any arguments for $guard , the auth helper function is an alternative to using the Auth facade. With no arguments, the auth function returns an instance of Illuminate\Contracts\Auth\Factory (which by...

Laravel String Helper Function: starts_with

…the opposite of ends_with , and has the same rules of use. Instead of checking if a given $haystack ends with any of the supplied $needles , startsWith checks if a given $haystack starts with any of the $needles . The signature for the startsWith...

Laravel String Helper Function: words

The words helper method is similar to the limit function, but instead of limiting the number of characters returned, it limits the number of words returned. The signature for the words helper function is: words($value, $words = 100, $end = '...')...

Laravel String Helper Function: length

The length helper method simply returns the length of the given $value , using PHP's internal character encoding. The signature for the length helper method is: length($value) 1 use Illuminate \ Support \ Str ; 2 3 // 5 4 echo Str :: length ( '...

Laravel Array Helper Function: array_flatten

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...

Command Interoperability and Laravel Artisan Applications

…san command development workflow involves writing commands that interact with different components of the application or external services; the commands themselves are usually isolated in their scope and generally do not depend on other commands...

Laravel 5.5 String Helper Function: before

…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 opposite of the after...

Laravel Helper Function: decrypt

decrypt($value) The decrypt helper function can be used to decrypt a given $value . The function resolves the configured Illuminate\Contracts\Encryption\Encrypter implementation from the Service Container and then calls the decrypt method on the...

Laravel Application Helper Function: abort

…If the $code supplied is 404 , the abort function will return an instance of Symfony\Component\HttpKernel\Exception\NotFoundHttpException using only the user supplied $message . The following example assumes that some $user object exists with the...

Filter Search