public function actionOwnerlist() { $response = array(); $query = Shopowner::find()->asArray()->all(); $response["data"] = $query; header('Content-type: application/json'); echo json_encode($response); }
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); }