Skip to content

Commit

Permalink
Revert "[9.x] Adds collection key first/last. (#41450)" (#41458)
Browse files Browse the repository at this point in the history
This reverts commit 3924fbaeebbe0d3aeb587ac6fa0bf871530f0e4a.
  • Loading branch information
taylorotwell committed Mar 12, 2022
1 parent d0481e3 commit 11c6786
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,6 @@ public function first(callable $callback = null, $default = null)
return Arr::first($this->items, $callback, $default);
}

/**
* Get the first key of the collection.
*
* @return mixed
*/
public function firstKey()
{
return array_key_first($this->items);
}

/**
* Get a flattened array of the items in the collection.
*
Expand Down Expand Up @@ -704,16 +694,6 @@ public function last(callable $callback = null, $default = null)
return Arr::last($this->items, $callback, $default);
}

/**
* Get the last key of the collection.
*
* @return mixed
*/
public function lastKey()
{
return array_key_last($this->items);
}

/**
* Get the values of a given key.
*
Expand Down

0 comments on commit 11c6786

Please sign in to comment.