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