src/Collection.php
public function takeRight($num)
    {
        if ($num > $this->count()) {
            $num = $this->count();
        }

        return $this->slice($this->count() - $num, $this->count());
    }
public function takeRight($num)
    {
        if ($num > $this->count()) {
            $num = $this->count();
        }

        return $this->slice($this->count() - $num, $this->count());
    }
{@inheritdoc}