staudenmeir / eloquent-eager-limit-x-laravel-cte
Merge of staudenmeir/eloquent-eager-limit and staudenmeir/laravel-cte
Fund package maintenance!
paypal.me/JonasStaudenmeir
Installs: 37 766
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 2
Open Issues: 0
Requires
- php: ^8.1
- illuminate/database: ^10.0
- staudenmeir/eloquent-eager-limit: ^1.8.1
- staudenmeir/laravel-cte: ^1.7
Requires (Dev)
- phpunit/phpunit: ^10.0
README
Important
The staudenmeir/eloquent-eager-limit
package's code has been merged into Laravel 11+ and eager loading limits are now supported natively.
This Laravel package merges staudenmeir/eloquent-eager-limit and staudenmeir/laravel-cte to allow them being used in the same model.
Supports Laravel 9–10.
Installation
composer require staudenmeir/eloquent-eager-limit-x-laravel-cte:"^1.0"
Use this command if you are in PowerShell on Windows (e.g. in VS Code):
composer require staudenmeir/eloquent-eager-limit-x-laravel-cte:"^^^^1.0"
Versions
Usage
Use the HasEagerLimitAndQueriesExpressions
trait in your model:
class User extends Model { use \Staudenmeir\EloquentEagerLimitXLaravelCte\Eloquent\HasEagerLimitAndQueriesExpressions; }
Contributing
Please see CONTRIBUTING and CODE OF CONDUCT for details.