Rincian pengguna pencarian Laravel berdasarkan peran tertentu
$search_query = $request->search_query;
$role = 'Member';
$results = User::with('roles')->whereHas("roles", function($q) use($role){
$q->where('title', '=', $role);
})->where('name', 'LIKE', "%{$search_query}%")->paginate(4);
Smiling Starling