Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Because you need to call first or get to actually execute the query. Model::where() is just adding a where clause to a builder, it does not execute a query.

Last updated 8 years ago.
0

Ok that makes sense. Sorry for the noob question, just learning all of this and some stuff doesn't have a ton of examples.

0

No worries man, it takes awhile to get used to what returns what and what methods to call on what. :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.