Esempio n. 1
0
 /**
  * [policyRBACDelAction remove each rbac relate with policy id]
  * @param  [integer] $id [policy id]
  * @return [type]     [description]
  */
 public function policyRBACDelAction($id)
 {
     $role_obj = new RolePolicy();
     $role_obj->delDataById($id);
     $data_obj = new DataPolicy();
     $data_obj->delDataById($id);
     $cond_obj = new ConditionPolicy();
     $cond_obj->delDataById($id);
     $purp_obj = new PurposePolicy();
     $purp_obj->delDataById($id);
     $obl_obj = new ObligationPolicy();
     $obl_obj->delDataById($id);
     $action_obj = new ActionPolicy();
     $action_obj->delDataById($id);
     return Redirect::to('/policy-rbac/' . $id)->with('success', 'อาร์บีเอซี:มีนโยบายคลังฯรหัส = ' . $id . ' ลบทิ้งสำเร็จ');
 }
Esempio n. 2
0
 /**
  * [delDataById description]
  * @param  integer 	$id 	policy id
  * @return array 	$datas  data id information and count
  */
 public function delDataById($id)
 {
     $data = ConditionPolicy::where('policy_id', '=', $id)->delete();
 }