コード例 #1
0
 public function actionSetCompanyService()
 {
     $status = 'OK';
     $data = Yii::$app->request->post();
     $cmid = $data['cmid'];
     $sbid = $data['sbid'];
     $state = $data['state'];
     $cs = new CompanyServices();
     $err = $cs->setCompanyService($cmid, $sbid, $state);
     if (!$err) {
         $status = 'ERROR';
     }
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     $responce = ['status' => $status];
     return $responce;
 }
コード例 #2
0
ファイル: Company.php プロジェクト: Bibihelper/Project2015
 public function getCompanyServices()
 {
     return $this->hasMany(CompanyServices::className(), ['company_id' => 'id']);
 }