Fetching users with role admin within a LookupTableBuilder
Created 6 years ago by williamI have a LookupTableBuilder where i want to fetch only users with the role admin. How do we do that? Tried the below but i guess that's not the way.
$query->with(['roles'=> function ($q) {
$q->where('slug', 'admin');
}]);
ryanthompson
—
6 years ago
This is the way