bubasuma\simplechat\db\Conversation::read PHP Method

read() public static method

public static read ( $userId, $contactId ) : array
$userId
$contactId
return array the number of rows updated
    public static function read($userId, $contactId)
    {
        $count = static::updateAll(['is_new' => false], ['receiver_id' => $userId, 'sender_id' => $contactId, 'is_new' => true]);
        return compact('count');
    }