protected function ungroupedPaginate($paginator, $perPage, $columns)
    {
        $total = $this->query->getPaginationCount();

        // Once we have the paginator we need to set the limit and offset values for
        // the query so we can get the properly paginated items. Once we have an
        // array of items we can create the paginator instances for the items.
        $page = $paginator->getCurrentPage($total);

        $this->query->forPage($page, $perPage);

        return $paginator->make($this->get($columns)->all(), $total, $perPage);
    }
protected function ungroupedPaginate($paginator, $perPage, $columns)
    {
        $total = $this->query->getPaginationCount();

        // Once we have the paginator we need to set the limit and offset values for
        // the query so we can get the properly paginated items. Once we have an
        // array of items we can create the paginator instances for the items.
        $page = $paginator->getCurrentPage($total);

        $this->query->forPage($page, $perPage);

        return $paginator->make($this->get($columns)->all(), $total, $perPage);
    }
protected function ungroupedPaginate ( $ paginator , $ perPage , $ columns ) { $ total = $ this -> query -> getPaginationCount ( ) ; // Once we have the paginator we need to set the limit and offset values for // the query so we can get the properly paginated items. Once we have an // array of items we can create the paginator instances for the items. $ page = $ paginator -> getCurrentPage ( $ total ) ; $ this -> query -> forPage ( $ page , $ perPage ) ; return $ paginator -> make ( $ this -> get ( $ columns ) -> all ( ) , $ total , $ perPage ) ; }
Get a paginator for an ungrouped statement.

@param \Illuminate\Pagination\Factory $paginator
@param int                            $perPage
@param array                          $columns

@return \Illuminate\Pagination\Paginator
Get a paginator for an ungrouped statement .