Search

Showing 7 of 1,975 result(s)

/blog/2014/10/18/thoughts-on-a-guidance-engine#content-a-guidance-engine

A lot of people probably though of search engines at the end of that last section. After all, that is what search engines are supposed to do: expose content from around the web. However, I find search engines distracting. For one thing, you may...

/blog/2018/04/11/laravel-5-randomizing-element-order-with-shuffle

The shuffle method can be used to shuffle an input array and then returns the results. This method takes advantage of PHP's shuffle method; therefore, it is not suitable for cryptographic purposes.The signature of the shuffle method is:In the...

/blog/2018/04/21/laravel-5-view-error-bags-getting-the-message-bag-instance-with-getbag

The getBag method can be used to retrieve a MessageBag instance associated with the provided $key . If a MessageBag instance does not exist with the provided $key , a new instance of "Illuminate\Support\MessageBag" will returned instead. The...

/blog/2018/04/22/laravel-5-collections-excluding-collection-elements-with-except

The except method will return all the key/value pairs in the collection where the keys in the collection are not in the supplied $keys array. Internally, this method makes a call to the "Illuminate\Support\Arr:except($array, $keys)" helper...

/blog/2018/04/22/laravel-5-collections-getting-the-first-collection-element-with-first#content-signature

The following example shows how to get the first item in a collection: If the collection is empty (having no items), the first method will return null : The $default parameter cannot be used when trying to get the first item in an empty...

/blog/2018/04/22/laravel-5-collections-grouping-collection-elements-with-groupby#content-preserving-keys-with-groupby

By default, the groupBy method will not preserve the keys in the underlying collection when grouping items. The following code sample shows how the groupBy method groups by default, and the output: The $grouped variable would now have a value...

/blog/2018/04/22/laravel-5-collections-removing-the-first-element-of-a-collection-with-shift

The shift method is used to remove the first item from the collection and return its value. The shift method modifies the collection instance. The shift method is similar in behavior to PHP's array_shift function.public function shift();The...