staudenmeir / eloquent-param-limit-fix
Laravel Eloquent eager loading fix for parameter limits of SQLite and SQL Server
Installs: 105 020
Dependents: 1
Suggesters: 0
Security: 0
Stars: 49
Watchers: 5
Forks: 7
Open Issues: 0
Requires (Dev)
- illuminate/database: ^11.0
- phpunit/phpunit: ^11.0
README
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
staudenmeir/laravel-adjacency-list
: Replace both packages with staudenmeir/eloquent-param-limit-fix-x-laravel-adjacency-list to use them on the same model.
Contributing
Please see CONTRIBUTING and CODE OF CONDUCT for details.