src/Pagination/Pagination.php
public function generateCollectionLinks()
    {
        $links = [
            'self' => $this->getPaginator()->getSelf(),
        ];

        if ($first = $this->getPaginator()->getFirst()) {
            $links['first'] = $first;
        }

        if ($previous = $this->getPaginator()->getPrevious()) {
            $links['previous'] = $previous;
        }

        if ($next = $this->getPaginator()->getNext()) {
            $links['next'] = $next;
        }

        if ($last = $this->getPaginator()->getLast()) {
            $links['last'] = $last;
        }

        return $links;
    }
public function generateCollectionLinks()
    {
        $links = [
            'self' => $this->getPaginator()->getSelf(),
        ];

        if ($first = $this->getPaginator()->getFirst()) {
            $links['first'] = $first;
        }

        if ($previous = $this->getPaginator()->getPrevious()) {
            $links['previous'] = $previous;
        }

        if ($next = $this->getPaginator()->getNext()) {
            $links['next'] = $next;
        }

        if ($last = $this->getPaginator()->getLast()) {
            $links['last'] = $last;
        }

        return $links;
    }
public function generateCollectionLinks ( ) { $ links = [ 'self' => $ this -> getPaginator ( ) -> getSelf ( ) , ] ; if ( $ first = $ this -> getPaginator ( ) -> getFirst ( ) ) { $ links [ 'first' ] = $ first ; } if ( $ previous = $ this -> getPaginator ( ) -> getPrevious ( ) ) { $ links [ 'previous' ] = $ previous ; } if ( $ next = $ this -> getPaginator ( ) -> getNext ( ) ) { $ links [ 'next' ] = $ next ; } if ( $ last = $ this -> getPaginator ( ) -> getLast ( ) ) { $ links [ 'last' ] = $ last ; } return $ links ; }
Generate URL links for a resource collection

@return array
Generate URL links for a resource collection