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