DEV Community

Discussion on: What is the most overlooked Laravel feature?

Collapse
 
bertheyman profile image
Bert Heyman

My own nomination: Query scopes

In short, they provide the ability to split your queries in building blocks, resulting in better readability (especially if things get complex!) and them being easier to maintain.

You don't really need them to write your query, which is why they are easily forgotten.

I once wrote an introduction for anyone looking to get started with query scopes.

Collapse
 
anwar_nairi profile image
Anwar

Query scopes are on fire indeed!