Commit b2f92691 authored by Taylor Otwell's avatar Taylor Otwell

Refactoring Eloquent for pagination changes.

parent 2cdee7af
......@@ -200,9 +200,9 @@ abstract class Eloquent {
$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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment