1$search_query = $request->search_query;
2$role = 'Member';
3$results = User::with('roles')->whereHas("roles", function($q) use($role){
4 $q->where('title', '=', $role);
5 })->where('name', 'LIKE', "%{$search_query}%")->paginate(4);