map(function ($value) { return new Endpoint($value); }); } public function set($model, $key, $value, $attributes) { if (!$value instanceof Collection) { return new Collection(); } return $value->map(fn ($endpoint) => (string) $endpoint); } }; } }