Пример #1
0
 public function actionGetGoodsByBrend()
 {
     $brend_id = Yii::$app->request->post('brend_id');
     $model = Goods::getGoodsByBrendId($brend_id);
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     if ($model) {
         return $this->renderAjax('/ajax/_get-goods-by-category', ['model' => $model]);
     } else {
         return $this->renderAjax('/ajax/_empty');
     }
 }