Placeholder component with relationship

I'm trying to show all the value when user creating invoice in the wizard. user name is not showing. How can I show invoice belong to user?
Forms\Components\Wizard\Step::make('Reviews')
->schema([
Forms\Components\Placeholder::make('number')
->content(fn($get) => $get('number')),
Forms\Components\Placeholder::make('user') <-- not working give me null
->content(fn($get) => $get('name')),
Forms\Components\Placeholder::make('note')
->content(
fn($get)
=> new HtmlString($get('note'))
),
]),
Forms\Components\Wizard\Step::make('Reviews')
->schema([
Forms\Components\Placeholder::make('number')
->content(fn($get) => $get('number')),
Forms\Components\Placeholder::make('user') <-- not working give me null
->content(fn($get) => $get('name')),
Forms\Components\Placeholder::make('note')
->content(
fn($get)
=> new HtmlString($get('note'))
),
]),
6 Replies
toeknee
toeknee4mo ago
Placeholders don't resolve content like that when I last checked... I would do a content as you lready are? But make it live()?
Shaung Bhone
Shaung BhoneOP4mo ago
In the wizard, user fill the form and finally show all the data in reviews wizard.
LeandroFerreira
LeandroFerreira4mo ago
Is the record created at this point?
Shaung Bhone
Shaung BhoneOP4mo ago
Yes
LeandroFerreira
LeandroFerreira4mo ago
then, you could inject the $record and use $record->user->name
Shaung Bhone
Shaung BhoneOP4mo ago
Wait sorry. Before created
Want results from more Discord servers?
Add your server