0

i m trying to replicate role in roles tables using laravel-spatie-permission,

like i have already abc role with api guard , but i want to create same role with same permission , but it's throwing error like a role 'abc' already exists for guard 'api', so my question is is there any way that we can create same role with same permission ?

Thanks you

apokryfos
  • 38,771
  • 9
  • 70
  • 114
Dharmesh
  • 1
  • 1
  • 7

1 Answers1

0

Even if it's possible don't create two roles with the same name instead you can do is to add a new column in your roles table with the name of DisplayName or any name that you want. and on that you can add same same name for your roles but keep the original name column unique. then show DisplayName to the user instead of name column

Mohammad Edris Raufi
  • 1,393
  • 1
  • 13
  • 34