Question: I am trying to remove the last two row in a Laravel Collection. The size of the Collection can vary, but I will always want to remove the last two. I managed it by doing this, but out of curiosity, do you think there is a better way to do this ?

Here is my way :

```
$results = $results->reverse()->slice(2)->reverse();

```

Thanks a lot

John

Answer: 
The Collection object's slice() method works similarly to [`array_slice()`](https://secure.php.net/manual/en/function.array-slice.php), allowing a negative value for the length argument, so you should be able to keep it simple and just do

```
$results = $results->slice(0, -2);

```
You can use the [pop](https://laravel.com/docs/master/collections#method-pop) method twice.