public function actionChangestatus() { $data = json_decode(file_get_contents("php://input")); $query = Shop::updateAll(['status' => $data->status], 'shopid = ' . $data->shopid); if ($query) { $response["status"] = 'success'; $response["message"] = 'Status changed successfully.'; //$response["data"]=(int)$model->id; http_response_code(200); header('Content-type: application/json'); echo json_encode($response, JSON_NUMERIC_CHECK); } }