public function incomeMessages()
{
return $this->hasMany(Message::class, 'receiver_id');
}
public function sentMessages()
{
return $this->hasMany(Message::class, 'sender_id');
}
public function sender()
{
return $this->belongsTo(User::class, 'sender_id');
}
public function receiver()
{
return $this->belongsTo(User::class, 'receiver_id');
}