if(Input::post('send')){
$var_perms = Input::post('var_perms');
foreach($var_perms as $elements=>$index){
$group = \Model\Auth_Group::find($elements, array('related' => array('permissions','grouppermission')));
foreach($index as $element){
$arr_permissions[] = $element;
foreach($group->permissions as $perms){
print_r($perms);
$perms->area = $name;
$perms->permission = $element ;
$perms->actions = $arr_permissions;
$perms->save();
}
foreach($group->grouppermission as $group_permission){
print_r($group_permission);
$group_permission->actions = $arr_permissions;
$group_permission->save();
}
$group->save();
}
}
Array ( [6] => Array ( [0] => new [1] => edit [2] => view ) [3] => Array ( [0] => edit ) )
[6] => Array ( [0] => new [1] => edit [2] => view )
It looks like you're new here. If you want to get involved, click one of these buttons!