use App\Models\Book;
use Illuminate\Routing\Controller;
use SehrGut\Eloquery\Facades\Eloquery;
class BooksController extends Controller
{
/**
* List all records of type `Book`.
*/
public function index()
{
$builder = Book::query();
Eloquery::apply($builder);
return $builder->get();
}
}
https://sehrgutesoftware.github.io/eloquery/api/v0.8.1/
Please refer to CHANGELOG.md.
- Refactor: Throw custom exception when parameters are invalid / insufficient
- Implement "include" grammar & operation
- Refactor: Query param names should be customizable
- Document query params syntax/usage
Tested with PHP 7.2, 7.3 and 7.4
composer install
composer test
composer docs
This software is licensed under the MIT License. See LICENSE.txt for details.