We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9e9e00 commit 92bc9aeCopy full SHA for 92bc9ae
src/Mmanos/Search/Query.php
@@ -1,6 +1,7 @@
1
<?php namespace Mmanos\Search;
2
3
use App, Input;
4
+use Illuminate\Pagination\LengthAwarePaginator;
5
6
class Query
7
{
@@ -220,17 +221,15 @@ public function delete()
220
221
*
222
* @param int $num
223
- * @return \Illuminate\Pagination\Paginator
224
+ * @return \Illuminate\Pagination\LengthAwarePaginator
225
*/
226
public function paginate($num = 15)
227
- $paginator = App::make('paginator');
228
-
229
$page = (int) Input::get('page', 1);
230
231
$this->limit($num, ($page - 1) * $num);
232
233
- return $paginator->make($this->get(), $this->count(), $num);
+ return new LengthAwarePaginator($this->get(), $this->count(), $num, $page);
234
}
235
236
/**
0 commit comments