Distinct in eloquent, laravel

Multi tool use
Multi tool use


Distinct in eloquent, laravel



I have a query which works according to my expectations, it returns users but the data is repeating and distinct is not working for some reason, would appreciate if someone could help me. thanks here is the query.


User::has('partner_groups')
->whereHas('partner_groups', function ($query) use ($id) {
$query->where('id', $id)->where('user_id', '!=', Auth::id());
})->get();









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

DlNkeKbEOPK
ZKA2KkXxMWZupWlcu0B,vwylqTzg,mc1h19TelpnLliR2Yp,F,r

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications