コード例 #1
0
ファイル: ShopController.php プロジェクト: nahidlu/easysale
 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 actionListowners()
 {
     $response = array();
     $query = Shopowner::find()->asArray()->all();
     //print_r($query);exit;
     $response["status"] = "success";
     $response["message"] = "Product listed successfully.";
     $response["data"] = $query;
     header('Content-type: application/json');
     echo json_encode($response);
 }