I created a role "Administrator" but each has one unique guard. I successfully generated them by creating custom function that replicates the web guard to sanctum. Or vice-versa depending where the role is created (e.g react frontend->sanctum guard), or laravel -> web guard).
Roles table
My current request validation rule is this:
'name' => ['required', 'max:70', 'unique:roles,name,'. $this->role->id]
I also tried this, but this won't work because it's intended only for the current role
'name' => ['required', 'max:70', 'unique:roles,name,id']
It returns "The name has already been taken."
I can't update the Role because there's an existing role that have the same name. How can I make my Request to ignore the duplicate role?