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.
findBy* methods (e.g., User::findByLastName()) instead of manual where()->first() chains. Aligns with goals to simplify common CRUD operations for backend teams.findBy* for readability").where()->first() patterns.Adopt if:
where()->first() or where()->get() queries for simple lookups.illuminate/support:>=5).Look elsewhere if:
findByFieldName methods).where clauses only).where())."This package lets our backend team write database queries in plain English—e.g., User::findByLastName('Smith') instead of User::where('last_name', 'Smith')->first(). It’s a 10-minute setup that could save hours weekly by reducing repetitive code. Low risk (MIT license, minimal dependencies), high reward for developer happiness and velocity. Ideal for admin panels or legacy systems where query clarity is critical."
*"Pros:
where()->first() chains with intuitive findBy* methods.Cons:
where() for joins/aggregations).Recommendation: Pilot in a non-critical module (e.g., admin dashboard) to measure dev productivity gains. If successful, standardize across new models. Avoid for high-performance APIs or mission-critical queries."*
Note: Emphasize that this is a developer experience (DX) tool, not a performance or security feature. Pair with a trial period to assess impact.
How can I help you explore Laravel packages today?