/** * Update collection to only contain last item * @return array */ public function execute() { $collection = $this->getCollection(); $this->arguments[] = count($collection) - 1; return parent::execute(); }
/** * Update collection to only contain first item * @return array */ public function execute() { $this->arguments[] = 0; return parent::execute(); }