php - Get response in JSON format in Yii2 - Stack Overflow

PHOTO EMBED

Thu Feb 17 2022 19:32:53 GMT+0000 (Coordinated Universal Time)

Saved by @NemoKing #php #yii2 #response #json #format

Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
content_copyCOPY

https://stackoverflow.com/questions/41675051/get-response-in-json-format-in-yii2