Download the PHP package victormgomes/laravel-query-engine without Composer
On this page you can find all versions of the php package victormgomes/laravel-query-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download victormgomes/laravel-query-engine
More information about victormgomes/laravel-query-engine
Files in victormgomes/laravel-query-engine
Package laravel-query-engine
Short Description Automatically generates dynamic API parameters, strict validation, and optimized queries based on Eloquent Models.
License MIT
Homepage https://github.com/victormgomes/laravel-query-engine
Informations about the package laravel-query-engine
Laravel Query Engine
Automatically generates dynamic API parameters, strict validation, and optimized queries based on Eloquent Models.
Package Status
Why Use It?
Stop writing repetitive boilerplate for every index endpoint. laravel-query-engine
acts as a seamless bridge between your HTTP requests and Eloquent.
It empowers a single RESTful controller to handle dynamic, infinitely complex API queries. It automatically handles all the heavy lifting—validation, type casting, and query construction—while respecting your model's native configuration.
You get the extreme flexibility of GraphQL, but with the simplicity and performance of standard Laravel REST APIs.
Features
- Automated Validation: Generates strict validation rules directly from your database schema.
- Dynamic Query Building: Translates validated URL parameters directly into native Eloquent builder actions.
- Strict Type Casting: Inspects your schema to accurately cast URL strings into their correct PHP types (integers, booleans, dates).
- Deep Security: Natively respects your model's existing visibility configurations to prevent unmapped column exposure.
- Advanced Querying: Out-of-the-box support for full-text search, complex date filters, and nested logical groupings.
- Model-Level Configuration: Use native PHP attributes directly on your models to securely expose Local Scopes and query aggregations.
- Exportable Schemas: Easily export deduplicated filter schemas to generate dynamic frontend UIs or OpenAPI documentation.
- AI Agent Ready: Includes an official Laravel Boost skill to automatically teach AI agents (like Claude Code and Cursor) how to use this package in your project.
How It Works
Pass dynamic query parameters via the URL using standard arrays or JSON.
The Request:
What the package executes under the hood:
Installation
-
Install the package via Composer:
- Publish the configuration file:
Quick Start
Step 1: Auto-generate validation rules
Annotate your FormRequest with #[MapQueryEngine(Model::class)].
It generates the validation rules based on the model schema.
Step 2: Build the query
The package automatically adds powerful new methods directly to all your Eloquent models. You can call these anywhere in your application (such as a Controller or a Service class) by simply passing the validated request:
This returns a LengthAwarePaginator with all valid filters, sorts, includes,
and pagination automatically applied.
Documentation
For a deep dive into the features, please read the Official Documentation.
Credits
Support Us
If you find this package useful in your day-to-day development, please consider sponsoring my work or leaving a ⭐ on the repository. Your support directly helps keep this project actively maintained and free!
Community & Guidelines
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-query-engine with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/pagination Version ^12.0 || ^13.0
illuminate/validation Version ^12.0 || ^13.0
illuminate/console Version ^12.0 || ^13.0
nesbot/carbon Version ^3.0
symfony/finder Version ^7.0 || ^8.0
ext-filter Version *