- Edited
just in api controller me calls this:
$user->groups()->attach(Group::MODER_ID);
but $user getting this group (MODER_ID) for forum only after TWO refreshing of forum pages. How the right way change user group in any flarum execute action?
Deleting group by
$user->groups()->detach(Group::MODER_ID);
has the same behaviour