I want to assign multiple groups to a user using sentry, how can I accomplish that?
I have a group table having id, name and permissions columns.
$groups = Sentry::findGroupById(1); anyway I can get multiple groups and then assign
$groups while creating user $user = Sentry::register([ 'permisions' => $groups]);
Found out the solution
foreach ($group as $g) {
$addGroup= Sentry::findGroupById($g);
$user->addGroup($addGroup);
}