Search

Showing 7 of 2,041 result(s)

/blog/2016/11/29/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....

/blog/2016/11/30/laravel-collection-public-api-reduce

reduce(callable $callback, $initial = null) The reduce method is to reduce a collection into only one item. It does this by iterating over the collection and applying the $callback function on each item. The $callback function should define two...

/blog/2016/11/30/laravel-collection-public-api-wherein

whereIn($key, array $values, $strict = true) The whereIn method is used to filter the collection based on a given $key and an array of the possible $values that the $key can have. The method also defines an optional $strict parameter, which when...

/blog/2018/04/22/laravel-5-collections-convert-collection-elements-into-object-instances-with-mapinto

The mapInto method is similar to the transform method in that allows you to quickly convert, or project, the contents of the collection to a new type. However, instead of building up the resulting type instance yourself, the mapInto method creates...

/blog/2016/11/30/laravel-collection-public-api-tojson

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

/blog/2016/12/07/laravel-artisan-closure-based-commands

Laravel 5.3 introduced a new shorthand syntax to make writing simple Artisan commands much simpler. The console kernel exposes a command($signature, Closure $callback) method. The $signature parameter accepts a command signature string , which...

/blog/2017/07/23/rebuilding-stillat#content-why-rebuild-the-site

My old site was built on WordPress (and there is nothing legitimately wrong with WordPress - there are many great sites built on it and I have recommended it to many people over the years - its just not something that works well with my workflow)....