I have a pretty basic setup in Laravel with users
, role_user
and roles
. Now, getting roles isn't too hard with return $this->belongsToMany(Role::class, 'role_user');
.
But now I want the inverse, the roles the user is NOT
attached to. Are there simple Laravel methods to do this, or should I write a query builder for this and if so, how?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire