Showing 10 of 1,280 results.

Laravel 5: Getting Specific Messages With get

The get method can be used to retrieve all the messages for a given $key with the specified $format . The $format is null by default, which will cause the get method to use the format stored within the MessageBag instance (which can be retrieved...

Laravel String Helper Function: upper

The upper method is the opposite of the lower method and it takes a given value and returns the upper case variant. This method is useful when doing string comparisons. The signature for the upper helper method is: upper($value) 1 use Illuminate...

Laravel 5: Accessing the Service Container With app

The app function provides access to the Illuminate\Container\Container instance. Because Container is a singleton, any call to app() will return the same Container instance. The app function can also be used to resolve registered dependencies from...

Laravel 5.5 String Helper Method: snake

The snake helper method replaces all uppercase letters within the string with the lower cased variant prefixed with the given $delimiter . The only exception to this rule is that if the first character of the string is capitalized, it will be...

Laravel Helper Function: encrypt

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

Laravel Collection Public API: count

count The count method is a straightforward method and simply returns the total number of items in the collection. The count method returns an integer. 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4 5 // Create a new collection instance. 6...

Laravel Translation Helper Function: trans

The trans helper function is used to return the translation for the given key. It defines a $key parameter which corresponds to an array key within the group file. It also accepts an array of replacements (which are passed through the $parameters...

Filter Search