Support the ongoing development of Laravel.io →
Database Eloquent IOC
Last updated 10 months ago.
0

Ok guys, i just found out what was missing, a subquery in the county whereHas, pretty noobie error that i found in the queryLog. This may serve for someone in the future.

Paginator::setPageName('page_pools'); $pools = Team::where('team_type','=','pool') ->whereHas('users',function ($q) { $q->whereHas('roles', function ($q){ $q->where('name','NOT LIKE', '%Admin%'); }); }) ->whereHas('county', function($q) use ($filter){ ( $q->where(function($q2) use ($filter) { $q2->where('name','LIKE','%'.$filter.'%')->where('abrev','LIKE','%'.$filter.'%','OR'); }));}) ->paginate(9);

Last updated 10 months ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

thiduzz thiduzz Joined 23 Sep 2014

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.

© 2023 Laravel.io - All rights reserved.