yii2 框架关联查询 直接返回数组

说明 返回数组方便做接口

$forum = Forum::find()->with('user')->where(['id' => $id, 'storeId' => $this->store->id])->asArray()->one();


需要with 和asArray配合使用

猜你喜欢

转载自blog.csdn.net/qq_39977679/article/details/80777489
今日推荐