Method |
Description |
|
__call ( string $name, array $arguments ) |
Magic method which allows you to run a DataModel method to all items in the collection. |
|
add ( mixed $item ) : Collection |
Add an item to the collection. |
|
contains ( mixed $key ) : boolean |
Determine if a key exists in the collection. |
|
diff ( Collection | array $collection ) : Collection |
Diff the collection with the given items. |
|
fetch ( string $key ) : Collection |
Fetch a nested element of the collection. |
|
find ( mixed $key, mixed $default = null ) : DataModel |
Find a model in the collection by key. |
|
intersect ( Collection | array $collection ) : Collection |
Intersect the collection with the given items. |
|
max ( string $key ) : mixed |
Get the max value of a given key. |
|
merge ( Collection | array $collection ) : Collection |
Merge the collection with the given items. |
|
min ( string $key ) : mixed |
Get the min value of a given key. |
|
modelKeys ( ) : array |
Get the array of primary keys |
|
removeById ( mixed $key ) : void |
Remove an item in the collection by key |
|
toBase ( ) : Collection |
Get a base Support collection instance from this collection. |
|
unique ( ) : Collection |
Return only unique items from the collection. |
|