JosephSilber / bouncer

Laravel Eloquent roles and abilities.
MIT License
3.45k stars 332 forks source link

isAn, isNotAn, isAll - does not accept an array #588

Closed francoism90 closed 2 years ago

francoism90 commented 2 years ago

I'm trying to use an array to check on roles, however I'm getting an Invalid model indentifier error.

Is it not possible to use an array? Any workarounds?

$user->isNotAn(['super-admin', 'admin' ..])

Thank you.

francoism90 commented 2 years ago

Solved it: $user->isNotAn(...['super-admin', 'admin' ..])