Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unabel to assign roles using Tinker or Tinkerwell #657

Open
krismanning opened this issue Aug 21, 2024 · 0 comments
Open

Unabel to assign roles using Tinker or Tinkerwell #657

krismanning opened this issue Aug 21, 2024 · 0 comments

Comments

@krismanning
Copy link

krismanning commented Aug 21, 2024

I have a problem adding roles to users either using Tinkerwell or Artisan Tinker using my production instance. The user is already an admin and I want to add an additional role to the user.

$kris = User::find(1);
$kris->assign("Editor+");
Bouncer::refresh();
$kris->getRoles();

Output:-

Illuminate\Support\Collection#3842 ▼
  all: array:1 [▼
    0 => "Admin"
  ]
}

This doesnt happen on my local dev environments (Windows or MacOs) where it works as expected. I havent tried adding the role through code yet but will do so asap.

And any ideas why this works in dev but not in prod?

Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant