@php $supporter = \Bican\Roles\Models\Role::where('slug', 'supporter')->first()->users()->where('users.id','!=',Auth::user()->id)->pluck('users.name','users.id')->toArray(); @endphp
you can use
Role::where('slug', 'supporter')->first()->users()
OR
Role::find($id)->users()
How I can get all users which have Role admin
find the solution
Auto apply to bolde.php
@php $supporter = \Bican\Roles\Models\Role::where('slug', 'supporter')->first()->users()->where('users.id','!=',Auth::user()->id)->pluck('users.name','users.id')->toArray(); @endphp you can use Role::where('slug', 'supporter')->first()->users() OR Role::find($id)->users()