public function actionGet_permissions()
{
    \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
    return Auth_Item::find()->where(['owner_user_id' => NULL])->all();
}

就是在要输出的代码之前 加上

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

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐