public function setLinks()
    {
        // Only required for collections as items contain links by default
        if ($this->resource instanceof Collection && $paginator = $this->resource->getPaginator()) {
            $pagination = new Pagination($paginator);
            $this->links = $pagination->generateCollectionLinks();
        } else {
            unset($this->links);
        }

        return $this;
    }
public function setLinks()
    {
        // Only required for collections as items contain links by default
        if ($this->resource instanceof Collection && $paginator = $this->resource->getPaginator()) {
            $pagination = new Pagination($paginator);
            $this->links = $pagination->generateCollectionLinks();
        } else {
            unset($this->links);
        }

        return $this;
    }
public function setLinks ( ) { // Only required for collections as items contain links by default if ( $ this -> resource instanceof Collection && $ paginator = $ this -> resource -> getPaginator ( ) ) { $ pagination = new Pagination ( $ paginator ) ; $ this -> links = $ pagination -> generateCollectionLinks ( ) ; } else { unset ( $ this -> links ) ; } return $ this ; }
Set the response links data

@return $this Instance of self
Set the response links data