Refactoring Eloquent for pagination changes.
This commit is contained in:
parent
2cdee7aff1
commit
b2f92691a6
|
@ -200,9 +200,9 @@ private function _paginate($per_page = null)
|
||||||
$per_page = static::$per_page;
|
$per_page = static::$per_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = \System\Paginator::page(ceil($total / $per_page));
|
$current_page = \System\Paginator::page($total, $per_page);
|
||||||
|
|
||||||
return new \System\Paginator($this->for_page($page, $per_page)->get(), $total, $per_page);
|
return new \System\Paginator($this->for_page($current_page, $per_page)->get(), $total, $per_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue