Display Relationshipvalue in View-Form on Resource-Modal

Hi - Since Discord decides to bug out on the search-function and scrolling the result and I can't find it anywhere, could someone please point me in the right direction?
I got a Resource and wanna do a quick view-action, so I build up the form()-method like this:
public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('myrelation.worker')
                    ->label('Queue'),
                Forms\Components\TextInput::make('myrelation.jobkey')
                    ->label('Job'),
                Forms\Components\Textarea::make('message')
                    ->label('Fehlernachricht'),
                Forms\Components\Textarea::make('job_data')
                    ->label('Payload'),
                Forms\Components\Textarea::make('trace')
                    ->label('Trace')
                    ->columnSpan(2),

            ]);
    }

The fields on the record itself work fine, but the RelationShip-Fields on "myrelation" are empty. I found how to fix that on selects, but not on TextInputs. How can I fill those fields with their respected values? (I don't think that I have a typo on the notions.)
Solution
->formatStateUsing(fn($record) => $record->myrelation->worker)

?
Was this page helpful?