where('user_id', $userId) ->where('notification_id', $notificationId) ->first(); if (! $row) { return false; } $row->is_read = true; $row->save(); return true; } }