Showing 10 of 2,055 results.

setLocale($locale) | The Laravel Translator

The setLocale method is used to set the locale that the translator should use. It accepts only one parameter $locale , which is the locale that should be set. By default, it is set to the value defined for locale in the app.php configuration file.

Laravel Artisan Config Command: The config:clear Command

The config:clear command is used to remove the configuration cache file created by the config:cache command. By default this command will delete the bootstrap/cache/config.php file. The following example shows how to call the config:clear command:...

Creating Simple HTTP Redirect Routes from a Statamic Site

I've recently been working on consolidating a number of websites. A common task when doing so is ensuring that all existing paths on separate domains are correctly redirecting to their new home. There are dedicated services that can handle these...

Laravel MessageBag Public API: merge

merge($messages) The merge method is used to combine, or merge , the contents of the MessageBag instance with the provided $messages . The $messages can be any valid array or an object instance that implements the...

getFirstFatalError | Blade Compiler

Retrieves the first fatal error. If the error source contains multiple types of errors, such as parser errors and validation errors, all errors will be considered. Fatal errors are considered those that would produce invalid compiled PHP code,...

Anonymous Functions | Procedure vs. Function vs. Method vs. ?

…runs in the context of the web browser (so we can use the console features, and what not. But it doesn't have to). When this code is ran, it will write "Hello, world!" to the console. But we didn't explicitly call a function here. This a function...