Ejemplo n.º 1
0
 /**
  * Định nghĩa quyền sản phẩm
  */
 public function actionDefineauth()
 {
     $params = Yii::$app->request->post();
     if (!empty($params)) {
         $item = AuthItem::authItemSave($params);
         if (!empty($item)) {
             return $this->response(new Response(true, 'Cấp quyền cho ' . $params['name'] . ' thành công', $item));
         } else {
             return $this->response(new Response(false, 'Cấp quyền không thành công', []));
         }
     }
 }