someonefamous/laravel-findby
Add dynamic finders to Eloquent models: call User::findByLastName('Smith') or User::findAllByFirstName('Bob') instead of where()->first()/get(). Works with any snake_cased field name via the FindBy trait.
Added some tests
Moved trait into a Traits subfolder, and adjusted namespace.
Apps upgrading from previous versions of this package will need to adjust the namespace on models using the trait:
From
use SomeoneFamous\FindBy\FindBy;
To
use SomeoneFamous\FindBy\Traits\FindBy;
Updated the code in the readme file, due to Laravel 8 changing its default namespace for models to App\Models.
How can I help you explore Laravel packages today?