Always allow specifying a page size with the API; closes #3218
This commit is contained in:
parent
9b46d59045
commit
48ad8f538e
8 changed files with 10 additions and 9 deletions
|
@ -30,7 +30,7 @@ class NestController extends ApplicationApiController
|
|||
*/
|
||||
public function index(GetNestsRequest $request): array
|
||||
{
|
||||
$nests = $this->repository->paginated(50);
|
||||
$nests = $this->repository->paginated($request->query('per_page') ?? 50);
|
||||
|
||||
return $this->fractal->collection($nests)
|
||||
->transformWith($this->getTransformer(NestTransformer::class))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue