I am using laravel permissions and i am creating and destroying permissions a lot and sometimes i cant tell if a user has a certain permission or don't and having to check if a user has a role and permission shall require additional code before i call role::create()
for instance.
If i try creating a role that already exists i get a database error and i want for this to fail gracefully like ignore role create or permission create if a user has a specific permission or role i am trying to add.
Does laravel-permissions come with a method to catch such exceptions instead of presenting a user with database errors?.