joskolenberg / laravel-jory
Create a flexible API for your Laravel application using json based queries.
Requires
- joskolenberg/eloquent-reflector: ^2.1
- joskolenberg/jory: ^2.0
- laravel/framework: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0
This package is auto-updated.
Last update: 2026-06-09 16:07:17 UTC
README
Laravel-Jory: Flexible Eloquent API Resources
Concept Overview
Laravel Jory creates a dynamic API for your Laravel application to serve the data from your Eloquent models. JoryResources are comparable to Laravel's built-in Resource classes but you only write (or generate) a JoryResource once for each model. Next, your data can be queried in a flexible way by passing a Jory Query to the Jory Endpoints.
Jory is designed to be simple enough to master within minutes but flexible enough to fit 95% of your data-fetching use-cases. It brings Eloquent Query Builder's most-used features directly to your frontend.
Supported Functions
Querying
- Selecting fields (database fields & custom attributes)
- Filtering (including nested
andandorclauses and custom filters) - Sorting (including custom sorts)
- Relations
- Offset & Limit
Endpoints
- Fetch a single record (like Laravel's
first()) - Fetch a single record by id (like Laravel's
find()) - Fetch multiple records (like Laravel's
get()) - Fetch multiple resources at once
Aggregates
Metadata
- Total records (for pagination)
- Query count
For more information take a look at the docs.
Happy coding!
Jos Kolenberg jos@kolenbergsoftwareontwikkeling.nl