laravel-api-query maintained by jwohlfert23
Last update
2026/04/04 17:53
License
Require
- php ^8.2
- nesbot/carbon ~3
- kirschbaum-development/eloquent-power-joins ^4.0
- illuminate/database ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- symfony/http-foundation ^7.0|^8.0
Last update
2026/03/20 14:02
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- symfony/http-foundation ^7.0|^8.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2026/02/17 19:24
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2026/02/13 15:50
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2026/02/04 15:44
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2025/04/08 14:38
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2025/03/13 16:15
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2025/03/11 01:24
License
Require
- php ^8.2
- nesbot/carbon ~3
- illuminate/database ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^4.0
Last update
2024/03/19 02:15
License
Require
- php ^8.2
- nesbot/carbon ~2
- illuminate/database ^10.0|^11.0
- illuminate/support ^10.0|^11.0
- symfony/http-foundation ^7.0
- kirschbaum-development/eloquent-power-joins ^3.4
Last update
2023/06/20 18:39
License
Require
- php ^8.0
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^3.0
Last update
2023/05/31 16:30
License
Require
- php ^8.0
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^3.0
Last update
2023/05/01 14:30
License
Require
- php ^8.0
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^3.0
Last update
2023/02/20 22:57
License
Require
- php ^8.0
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2023/02/20 22:40
License
Require
- php ^8.0
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2023/02/01 17:32
License
Require
- php >=7.3
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2022/02/10 14:14
License
Require
- php >=7.3
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2022/02/10 02:18
License
Require
- php >=7.3
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2022/02/09 16:48
License
Require
- php >=7.3
- nesbot/carbon ~2
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- symfony/http-foundation ^5.2.0|^6.0
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/05/29 19:03
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=7.0
- illuminate/support >=7.0
- symfony/http-foundation ^5.2
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/05/26 00:31
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=7.0
- illuminate/support >=7.0
- symfony/http-foundation ^5.2
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/05/10 01:16
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=7.0
- illuminate/support >=7.0
- symfony/http-foundation ^5.2
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/05/06 17:41
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=7.0
- illuminate/support >=7.0
- symfony/http-foundation ^5.2
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/05/03 22:05
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=7.0
- illuminate/support >=7.0
- symfony/http-foundation ^5.2
- kirschbaum-development/eloquent-power-joins ^2.4
Last update
2021/04/15 20:47
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2021/01/04 20:42
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/11/04 17:19
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/10/23 15:38
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/09/22 18:19
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/08/30 21:22
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/08/26 00:40
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/07/10 21:31
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/27 04:06
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/25 15:28
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/18 18:11
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/17 15:26
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/13 19:16
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/09 19:51
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/09 16:18
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/09 15:07
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/09 14:13
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/08 21:52
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/08 21:49
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Last update
2020/05/08 21:32
License
Require
- php >=5.5.9
- nesbot/carbon ~2
- illuminate/database >=6.0
- illuminate/support >=6.0
Build Eloquent Queries from Request Query Params
Installation
composer require jwohlfert23/laravel-api-query
Usage
This package is implemented as a trait, which provides the buildFromRequest scope.
use Jwohlfert23\LaravelApiQuery\BuildQueryFromRequest;
class Post {
use BuildQueryFromRequest;
}
Post::buildFromRequest()->get();
?sort=-id,name
is the same as:
Post::orderByDesc('id')->orderBy('name');
?filter[name]=Bobby&filter[author.name][contains]=Bob
is the same as:
Post::where('name', 'Bobby')->whereHas('author', function($q) {
$q->where('name', 'like', '%Bob%');
});
Note: this package doesn't use "whereHas", but rather performs left joins internally. However, the results should be the same as the above code.
Filters default to using the "equal" operator. These are the operators available to use in filtering (contains is use above).
- eq (=)
- gt (>)
- gte (>=)
- lt (<)
- lte (<=)
- contains
?with=author,comments
is the same as
Post::with('author','comments');