Showing 10 of 2,145 results.

Laravel Collection Public API: where

where($key, $operator, $value = null) The where method allows developers to filter a collection given a key value pair. It filters the collection's items by checking that the given $key has some value equal to the provided $value . An argument can...

Laravel Application Helper: response

response($content = '', $status = 200, array $headers = []) The response helper function is a useful function that can be used to accomplish two different tasks. If no arguments are supplied to the response function, an implementation of...

Laravel MessageBag Public API: toJson

toJson($options = 0) The toJson method will return a JSON encoded version of the data stored within the message bag instance. It internally does this by returning a call to PHP's json_encode function, passing in any $options that were supplied....

Laravel Artisan Generator Command: The make:migration Command

The make:migration command is used to generate a new migration class. Generated migrations are (by default) stored in the database/migrations directory. The make:migration defines a few parameters and options that can be used to customize the...

Laravel Artisan Custom Styles: Custom Progress Bar Styles

There are extensive customizations that can be made to console progress bars. The progress bars that are displayed in Laravel commands are an instance of Symfony\Component\Console\Helper\ProgressBar class. Progress bars also inherit their styles...

Laravel: Implementing a CRYPT_SHA256 Hasher

In this article we will create an implementation of Illuminate\Contracts\Hashing\Hasher using PHP's crypt function and the CRYPT_SHA256 hashing function. Like in the previous sections, we will examine each method before looking at the full...