How to pass Entry id into ViewField

I want do something like this in my resource:

ViewField::make('frontend-link')
     ->view('filament.fields.frontend-link')
     ->viewData([
        'id' => $modelId // A closure seems not to be an option
        // 'id' => fn (Model $record): ?string => $record->id // Not working
     ])


What's the best way to pass my model id into the view?
Was this page helpful?