Showing 10 of 2,055 results.

Laravel Collection Public API: contains

contains($key, $value = null) The contains method is used to determine if a given $key exists within the collection. Additionally, an option $value can be specified that will be used to check if a given key/value pair exists within the collection....

Laravel Collection Public API: last

last(callable $callback = null, $default = null) The last method is the logical opposite of the first method, and is used to get the last item in a collection, or to get the last item in a collection that matches a certain criteria. A $callback...

Laravel Collection Public API: unique

unique($key = null) The unique method can be used to get all the unique items in the collection. It accepts an option $key which can be used to further restrict which items are returned. The unique method returns a new instance of Collection with...

Laravel Collection Public API: first

first(callable $callback = null, $default = null) The first method is used to get the first item in a collection, or to get the first item in a collection that matches a set of criteria. A $callback can be supplied to return the first item in the...

Implementing C# Events

A common requirement when designing and implementing software is the ability to respond to certain code conditions, or at key points in an application's execution lifecycle. These conditions and lifecycle points can be thought of as events , where...