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 6b34fcd + 315edad commit 642b9d7Copy full SHA for 642b9d7
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