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);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community