Refactoring query builder for pagination changes.
This commit is contained in:
parent
b2f92691a6
commit
b933b19dfd
|
@ -464,9 +464,9 @@ public function paginate($per_page)
|
|||
{
|
||||
$total = $this->count();
|
||||
|
||||
$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