Commit f0e31344 authored by Taylor Otwell's avatar Taylor Otwell

Refactoring paginator class.

parent 677747c4
......@@ -67,7 +67,9 @@ class Paginator {
*/
public static function page($total, $per_page)
{
if (is_numeric($page = Input::get('page', 1)) and $page > $last_page = ceil($total / $per_page))
$page = Input::get('page', 1);
if (is_numeric($page) and $page > $last_page = ceil($total / $per_page))
{
return $last_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