How to remove unnecessary metadata as a result of find () methods? And then there is no desire to keep such a horror either on the client or in the session.

    1 answer 1

    After $model->find()

    $dataForClient = $model->attributes

    returns an array of data

    • That is, if one model works with one table base. And if the query is relational? - Samat Zhanbekov
    • then, probably, use your hands to fill your own array with $ model-> attributes and foreach ($ model-> otherModels as $ otherModel) {} - Demyan112rv