src/Pagination/CursorBuilder.php
protected function previous(Cursor $cursor, $columns)
    {
        $items = $this
            ->whereId($cursor->getBefore(), $this->descending ? '>' : '<')
            ->orderForPrevious()
            ->get($cursor->getLimit(), $columns)
            ->reverse()
            ->values();

        return new CursorPaginator($items, true, $cursor, $this->key);
    }
protected function previous(Cursor $cursor, $columns)
    {
        $items = $this
            ->whereId($cursor->getBefore(), $this->descending ? '>' : '<')
            ->orderForPrevious()
            ->get($cursor->getLimit(), $columns)
            ->reverse()
            ->values();

        return new CursorPaginator($items, true, $cursor, $this->key);
    }
protected function previous ( Cursor $ cursor , $ columns ) { $ items = $ this -> whereId ( $ cursor -> getBefore ( ) , $ this -> descending ? '>' : '<' ) -> orderForPrevious ( ) -> get ( $ cursor -> getLimit ( ) , $ columns ) -> reverse ( ) -> values ( ) ; return new CursorPaginator ( $ items , true , $ cursor , $ this -> key ) ; }
Get the previous page.

To get the previous page, we need to sort in the opposite direction
(i.e. ascending rather than descending), then reverse the results
so that they are in the correct page order.

The previous page always has-more items, because we know there is
at least one object ahead in the table - i.e. the one that was
provided as the before cursor.

@param Cursor $cursor
@param $columns
@return CursorPaginator
Get the previous page .