Commit 873e4ee2 authored by Taylor Otwell's avatar Taylor Otwell

Tweaking paginator class.

parent 721693a5
...@@ -47,10 +47,12 @@ class Paginator { ...@@ -47,10 +47,12 @@ class Paginator {
*/ */
public function __construct($results, $total, $per_page) public function __construct($results, $total, $per_page)
{ {
$this->page = static::page($total, $per_page);
$this->per_page = $per_page; $this->per_page = $per_page;
$this->results = $results; $this->results = $results;
$this->total = $total; $this->total = $total;
// Determine the current page based on the total results and per page limit.
$this->page = static::page($this->total, $this->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