User Profile

Hello, I currently have a user and profile model. What I want to achieve is that when I create or update a user, there should be a profile form below it. This way, when I save the user data, I also want the profile to be automatically filled.
image.png
Solution
Or easy way.. you can do like this and remove "additional logic"
Forms\Components\Section::make()
    ->relationship('profile')
    ->schema([
        Forms\Components\TextInput::make('age'),
        Forms\Components\TextInput::make('height'),
    ])

If you use like this, then you can remove all of this additional inside 'create' and 'edit' pages
Was this page helpful?