vendredi 18 septembre 2015

Retrieving all users with a specific permission in Laravel 5 / Entrust

How can I retrieve the users of a specific permission in Entrust for Laravel 5.0.

use App\Role;
use App\Permission;    

$permission = Permission::find(1);
$roles = $permission->roles;
$users = $roles->users;

I know the code doesn't work... Just an example.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire