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

https://laravel.com/docs/5.2/eloquent

There's also some "advanced wheres" somewhere in the documentation.

0

Thanks for reply me. But i want where clause in eloquent relationship that described above.

0

Try using whereHas, eg.

->whereHas('RelationshipName', function($query) {
  $query('your-field', your-condition);
})
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.