Showing 10 of 2,055 results.

Laravel Application Helper Function: method_field

method_field($method) The method_field helper function is a simple function that returns a new instance of Illuminate\Support\HtmlString . The contents of the HtmlString instance is a hidden HTML input field with the name _method and the a value...

Laravel Collection Public API: forget

forget($key) The forget method removes an item from the collection based on given $key . The forget method returns a reference to the original collection, meaning it modifies the collection instance it was called on. The following code example...

Laravel Collection Public API: collapse

collapse The collapse method combines all the first-level items of a collection into a new, single collection. The returned value of the collapse method is an instance of the Collection class. We will create a simple collection to work with like...

Laravel Collection Public API: diff_keys

diffKeys($items) The diffKeys method is similar to the diff method. It is used to determine which items whose keys in the collection are not present in the supplied $items collection's keys. $items can be either an array, or another instead of...