Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Illuminate/Collections/Enumerable.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,19 @@ public function slice($offset, $length = null);
*/
public function split($numberOfGroups);

/**
* Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception.
*
* @param mixed $key
* @param mixed $operator
* @param mixed $value
* @return mixed
*
* @throws \Illuminate\Collections\ItemNotFoundException
* @throws \Illuminate\Collections\MultipleItemsFoundException
*/
public function sole($key = null, $operator = null, $value = null);

/**
* Chunk the collection into chunks of the given size.
*
Expand Down