We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aed545a + d15b825 commit 12f43d0Copy full SHA for 12f43d0
app/Tricks/Repositories/Eloquent/TrickRepository.php
@@ -125,7 +125,12 @@ public function findMostCommented($perPage = 9)
125
return $trick->comment_count;
126
})->reverse();
127
128
- return \Paginator::make($tricks->all(), count($tricks), $perPage);
+ $page = \Input::get('page', 1);
129
+ $skip = ($page - 1) * $perPage;
130
+ $items = $tricks->all();
131
+ array_splice($items, 0, $skip);
132
+
133
+ return \Paginator::make($items, count($tricks), $perPage);
134
}
135
136
/**
0 commit comments