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.
perPage
1 parent 6b34fcd commit 315edadCopy full SHA for 315edad
src/Actions/PaginateResults.php
@@ -15,9 +15,11 @@ public function __construct(
15
) {}
16
17
public function handle(Builder $query, Closure $next): Collection | LengthAwarePaginator {
18
+ $perPage = $this->request->integer('perPage', $query->getModel()->getPerPage());
19
+
20
return $next($this->request->boolean('all')
21
? $query->get()
- : $query->paginate()->withQueryString()
22
+ : $query->paginate($perPage)->withQueryString()
23
);
24
}
25
0 commit comments