Skip to content

Repository files navigation

Eloquent Eager Limit + Laravel CTE

CI Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads License

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

Laravel Package
10.x 1.1
9.x 1.0

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.

About

Merge of staudenmeir/eloquent-eager-limit and staudenmeir/laravel-cte

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages