where('user_id', $user->id) ->where('type', $type->key) ->first(); return $row->email_enabled ?? $type->defaultEmailEnabled; } }