Support the ongoing development of Laravel.io →

whnunlife

Joined 23 Jun 2014

Statistics

Threads 2
Replies 5
Solutions 0
Articles 0

Eloquent ORM - Returning more data than I expect

Running into this odd little issue here with a ORM query. Let me first define how my models are stru...

0 Likes
5 Replies

Help with ordering related models

I'm trying to order my data, by the "belongsTo" association. Model: Contact BelongsTo: Age...

0 Likes
0 Replies
replied 10 years ago

Eloquent ORM - Returning more data than I expect

K, got it working. This is the query: $data = Contact::whereHas('agency', function($q) use ($agency)...

0 Likes
replied 10 years ago

Eloquent ORM - Returning more data than I expect

Sure, here is the debug query: [2014-07-18 11:53:07] local.ERROR: select * from `contacts` where (se...

0 Likes
replied 10 years ago

Eloquent ORM - Returning more data than I expect

So I changed the query to the above, but noticed that in the debug query, the 2 parts of the query a...

0 Likes
replied 10 years ago

Eloquent ORM - Returning more data than I expect

With Edit 2, if I use the "with", I still need to define the condition that give me all co...

0 Likes
replied 10 years ago

Eloquent ORM - Returning more data than I expect

Thanks for clearing up my code snippet! I don't think the orWhere would help me much though. I need...

0 Likes

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.