예제 #1
0
 public function actionOwnerlist()
 {
     $response = array();
     $query = Shopowner::find()->asArray()->all();
     $response["data"] = $query;
     header('Content-type: application/json');
     echo json_encode($response);
 }
예제 #2
0
 public function actionDetails($OwnerId)
 {
     $model = Shopowner::findOne($OwnerId);
     $shopmodel = Shop::find()->where(['owner_id' => $OwnerId])->all();
     //$connection = \Yii::$app->db;
     //echo $model->name;
     //exit;
     return $this->render('details', ['model' => $model, 'shopmodel' => $shopmodel]);
 }