Download the PHP package adrosoftware/laravel-data-proxy without Composer
On this page you can find all versions of the php package adrosoftware/laravel-data-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adrosoftware/laravel-data-proxy
More information about adrosoftware/laravel-data-proxy
Files in adrosoftware/laravel-data-proxy
Package laravel-data-proxy
Short Description A GraphQL-like declarative data retrieval layer for Laravel with query batching and optimization
License MIT
Informations about the package laravel-data-proxy
Laravel Data Proxy
A GraphQL-like declarative data retrieval layer for Laravel with automatic query batching and optimization.
Why DataProxy?
| Problem | DataProxy Solution |
|---|---|
| N+1 queries across multiple data sources | Automatic query batching by model |
| Verbose, scattered query code | Declarative requirements in one place |
| Complex eager loading setup | GraphQL-like nested shapes |
| No visibility into query performance | Built-in metrics tracking |
| Repetitive data fetching patterns | Reusable, composable data classes |
Features
- Declarative Requirements - Define what data you need, not how to fetch it
- Automatic Query Batching - Same-model lookups are combined into single queries
- Nested Relations - GraphQL-like shapes with field selection and constraints
- Schema Agnostic - No schema assumptions; respects your Eloquent model configurations
- Memory Efficient - Lazy DataSet collections with chunking support
- Built-in Caching - Per-requirement caching with tags support
- Presenter Support - Integrate with any presenter package
- Pagination - First-class pagination handling
- Metrics Tracking - Monitor query counts, execution time, and memory usage
Requirements
- PHP 8.2 or higher
- Laravel 11.x, 12.x, or 13.x
Installation
The package auto-registers its service provider and facade with Laravel.
Publish Configuration (Optional)
Quick Start
Core Concepts
Requirements
The Requirements class defines what data you need:
Shape
The Shape class defines the structure of data to retrieve:
Custom Query Scopes
Apply custom query modifications using scopes. Multiple scopes accumulate and are applied in order:
Scopes receive ($query, $resolved) parameters where $resolved contains all previously resolved requirements.
To inspect or clear scopes:
Result
The Result class provides access to resolved data:
Using the Facade
Configuration Presets
Creating Data Classes
Organize your data requirements into reusable classes:
Working with DataSet
Query results are returned as lazy DataSet collections:
Pagination
Caching
Presenter Integration
Using a Closure Adapter
Using Laravel Model Presenter
Documentation
For detailed documentation, see the /docs directory:
- Getting Started
- Usage Guide
- Use Cases
- Configuration
- API Reference
Testing
License
MIT License. See LICENSE for details.
All versions of laravel-data-proxy with dependencies
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/cache Version ^11.0|^12.0|^13.0