mashirou1234/laravel-when-on-relation
Adds a whenOnRelation helper to Laravel Eloquent so you can run callbacks or apply constraints only when a relationship is loaded or present. It keeps relation-aware models, queries, and API resources concise and free of repetitive checks.
|
Package
|
Constraint
|
|---|---|
| illuminate/database | ^13.0 |
| illuminate/support | ^13.0 |
|
Package
|
Constraint
|
|---|---|
| laravel/pint | ^1.0 |
| orchestra/testbench | ^11.0 |
| phpunit/phpunit | ^11.5 || ^12.0 || ^13.0 |
How can I help you explore Laravel packages today?