Skip to content

Laravel Eloquent eager loading fix for parameter limits of SQLite and SQL Server

License

Notifications You must be signed in to change notification settings

staudenmeir/eloquent-param-limit-fix

Repository files navigation

Eloquent Param Limit Fix

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

This Laravel Eloquent fix allows eager loading beyond the parameter limits of MySQL/MariaDB (65,535), PostgreSQL (65,535), SQLite (999), and SQL Server (2,100).

Tested with Laravel 5.4+.

Installation

composer require staudenmeir/eloquent-param-limit-fix

Usage

Use the ParamLimitFix trait in the affected parent models:

class User extends Model
{
    use \Staudenmeir\EloquentParamLimitFix\ParamLimitFix;

    public function posts()
    {
        return $this->hasMany('App\Post');
    }
}

$users = User::with('posts')->get();

Package Conflicts

Contributing

Please see CONTRIBUTING and CODE OF CONDUCT for details.

About

Laravel Eloquent eager loading fix for parameter limits of SQLite and SQL Server

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages