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.
Ok that makes sense. Sorry for the noob question, just learning all of this and some stuff doesn't have a ton of examples.
No worries man, it takes awhile to get used to what returns what and what methods to call on what. :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community