Search

Showing 7 of 1,975 result(s)

/blog/2016/11/30/the-laravel-translator#content-getloader

The getLoader method is used to return the instance of the Illuminate\Translation\LoaderInterface implementation the translator is currently using. By default, this will be an instance of Illuminate\Translation\FileLoader , which is registered...

/blog/2016/12/01/laravel-artisan-command-input-and-command-signatures#content-input-parameters

…to accept a user's first and last name: Since the {firstName} and {lastName} input requirements were defined as parameters and do not define a default value, the command requires that arguments be supplied for them. Running the following command...

/blog/2017/11/27/laravel-55-string-helper-function-before

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

/blog/2018/04/14/laravel-5-conditionally-throwing-exceptions-with-throw_if

The throw_if function can be used to throw an exception if the supplied $boolean value evaluates to true . The supplied $parameters will be passed along to the exception's constructor.The signature of the throw_if function is:In the following...

/blog/2018/04/14/laravel-5-conditionally-throwing-http-exceptions-with-abort_if

…e line.The signature of the abort_if function is:The following example assumes that some $user object exists with the property admin . The example will check to make sure that the admin property is true . If not, the code will abort with a 401...

/blog/2018/04/14/laravel-5-decrypting-strings-with-decrypt

The decrypt helper function can be used to decrypt the provided value. The function resolves the configured "Illuminate\Contracts\Encryption\Encrypter" implementation from the Service Container and then calls the decrypt method on the Encrypter...

/blog/2018/04/14/laravel-5-generating-csrf-hidden-html-fields-with-csrf_field

The csrf_field function can be used to generate a hidden HTML element containing the value of the CSRF token. These tokens can help to prevent cross-site request forgeries.The signature of the csrf_field function is: function csrf_field();For...