DatabaseNotificationCollection::sortBy()

Collection sortBy(callable|string $callback, int $options = SORT_REGULAR, bool $descending = false) Sort the collection using the given callback. Parameters callable|string $callback int $options bool $descending Return Value Collection

DatabaseNotificationCollection::sort()

Collection sort(callable $callback = null) Sort through each item with a callback. Parameters callable $callback Return Value Collection

DatabaseNotificationCollection::slice()

Collection slice(int $offset, int $length = null) Slice the underlying collection array. Parameters int $offset int $length Return Value Collection

DatabaseNotificationCollection::shuffle()

Collection shuffle(int $seed = null) Shuffle the items in the collection. Parameters int $seed Return Value Collection

DatabaseNotificationCollection::shift()

mixed shift() Get and remove the first item from the collection. Return Value mixed

DatabaseNotificationCollection::search()

mixed search(mixed $value, bool $strict = false) Search the collection for a given value and return the corresponding key if successful. Parameters mixed $value bool $strict Return Value mixed

DatabaseNotificationCollection::reverse()

Collection reverse() Reverse items order. Return Value Collection

DatabaseNotificationCollection::reject()

Collection reject(callable|mixed $callback) Create a collection of all elements that do not pass a given truth test. Parameters callable|mixed $callback Return Value Collection

DatabaseNotificationCollection::reduce()

mixed reduce(callable $callback, mixed $initial = null) Reduce the collection to a single value. Parameters callable $callback mixed $initial Return Value mixed

DatabaseNotificationCollection::random()

mixed random(int $amount = 1) Get one or more items randomly from the collection. Parameters int $amount Return Value mixed Exceptions InvalidArgumentException