hi,
i meet some trouble, now i want to query all users of superAdmin,
roleName = 'superAdmin', so what should I do ?
Not directly in the document but is in the source.
$superAdmin = Role::findByName('superAdmin');
dd($superAdmin->users);
Of course, that's a Collection so things like...
$superAdmin->users->each(function($user)
{
dump($user->name);
});
Behave nicely too. :)
Anything QueryBuilder instead of Collection?
Most helpful comment
Not directly in the document but is in the source.
Of course, that's a Collection so things like...
Behave nicely too. :)