soyhuce/laravel-eloquent-extended
Soyhuce's Laravel Eloquent Extended adds practical helpers on top of Laravel's ORM, streamlining model definitions, attribute handling and query building so you can write cleaner, more expressive Eloquent code with less boilerplate.
composer require soyhuce/laravel-eloquent-extended:^1.8
1.8.0 is a compatibility release: the only functional signal is that the test suite now runs against Laravel 12. There are no new APIs and no breaking changes — the dependabot PR (fetch-metadata 2.2.0 → 2.3.0) is CI-only. If you are still on Laravel 9/10/11, nothing forces an upgrade; if you are planning a Laravel 12 move, this release is the one to target.composer.json in the package for the illuminate/* and php ranges, then composer why-not soyhuce/laravel-eloquent-extended 1.8.0 in your app to see whether anything blocks it.README.md — the feature table is the source of truth for what is actually exposed; the package ships more than the changelog will ever tell you.src/ — most of the surface area is traits and query-builder macros, so a grep -r "trait " src/ gives you the opt-in points in about ten seconds.tests/ — the package's own test suite is the best usage documentation; each test is a working example you can paste into a tinker session.App\Models\BaseModel that uses the package trait and extends Illuminate\Database\Eloquent\Model, then let models inherit. This keeps the blast radius to one file and makes it trivial to revert.composer update soyhuce/laravel-eloquent-extended --with-all-dependencies in isolation, run the suite, then fold it into the framework upgrade. Because 1.8.0 only widens framework support, it is a safe "free" upgrade to land before a Laravel 12 migration so the package is not the thing blocking you.^1.8 before you migrate production.phpstan.neon ignoreErrors or stub list, and run analysis in the same PR that introduces the trait so the baseline does not drift.->toSql() / DB::listen) for at least one test per adopted helper — this is what catches silent changes on the next minor bump.spatie/laravel-sluggable, wildside/userstamps, or your own BaseModel traits frequently override the same Eloquent methods. PHP resolves same-named trait methods by declaration order with no warning; use insteadof/as explicitly, and put the package trait in a predictable position.Builder::macro() helpers with the same name, whichever registers last wins and the failure looks like a logic bug, not a conflict. Grep your AppServiceProvider before adopting.composer.json between 1.7.1 and 1.8.0 — that is the real compatibility contract.php artisan octane:start --watch) rather than only under php artisan serve.Model::query()->toSql() and getBindings() before reading package source; nine times out of ten the scopes interact in an order you did not expect.Builder::macro, custom casts, and Model::resolveRelationUsing usually cover what you would otherwise patch into the package. Only fork if you need to change behaviour of an existing method.^1.8 and read the package source for anything undocumented. This package's README lags the code; the src/ tree is small enough to read in a sitting and is more reliable than guessing at method signatures.How can I help you explore Laravel packages today?