andersao / andersao/l5-repository
Disable "Limit" with Query Parameters
- 主要言語
- PHP
- スター
- 4.2k
- フォーク
- 880
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hey @andersao and community,
thank you very much for this awesome package.
I have an issue, which I am currently not able to resolve by myself - however, maybe you can help me with this problem!?
Consider the following example:
I have a route, that returns all entities of a respective repository, like so:
```php
return $this->repository->paginate();
```
where `$this->repository` is the respective repository.
As I am using `paginate()`, all results are paginated (e.g., only 20 entries per page are displayed), which is a desired behaviour for my mobile application clients. However, web-clients (which may have a better connectivity) should receive all entities.
Is there a way to "disable" the `limit` query parameter? My current "workaround" is to make a request with `?limit=100000`. Clearly, this is not a good solution - can you provide me with any better idea? Is there a built-in-way to do this?!
Cheers and thanks a lot!
コントリビューションガイド
評価
この issue はまだ評価されていません。