whereAny() and whereAll() collapse repetitive orWhere and where chains into a single, readable call across multiple columns.
#Query Builder
Articles
Stop wrapping query builder calls in if statements. The when() and unless() methods let you apply constraints conditionally while keeping the chain fluent.
Query scopes let you name and reuse common Eloquent constraints so your controllers stay readable and your query logic lives in one place.
Links
Proper API design in Laravel
Martin Joo