diff --git a/models/Message.php b/models/Message.php index daa12c8..f221049 100644 --- a/models/Message.php +++ b/models/Message.php @@ -36,9 +36,9 @@ public static function conversations($userId) 'contact' => function ($contact) { /**@var $contact ActiveQuery * */ $contact->with([ - 'profile' => function ($advanced) { - /**@var $advanced ActiveQuery * */ - $advanced->select(['id', 'CONCAT_WS(\' \', first_name, last_name) AS name', 'avatar']); + 'profile' => function ($profile) { + /**@var $profile ActiveQuery * */ + $profile->select(['id', 'CONCAT_WS(\' \', first_name, last_name) AS name', 'avatar']); }, ])->select(['id']); },