Commit 9a36124b authored by Taylor Otwell's avatar Taylor Otwell

Refactoring Paginator.

parent 7ec88d3f
......@@ -51,15 +51,15 @@ class Paginator {
$this->results = $results;
$this->total = $total;
// Validate and set the current page. If the given page is greater than the last page, the
// current page will be set to the last page. If the given page is not an integer or is less
// than 1, the current page will be set to 1.
$this->page = static::page($this->last_page());
}
/**
* Get the current page from the request query string.
*
* The page will be validated and adjusted if it is less than 1 or
* greater than the last page number.
*
* @param int $last_page
* @return int
*/
......
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