I have a table messages with the messages:
message - the message
from_whom - who
whom - to whom
How to lead those with whom correspondence was carried on?
I tried to use
$this->hasOne(Users::className(), ['user_id' => 'from_whom']);
tripped up on everyone and the where and orWhere and not user_id = my id does not work