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.
Solution:Jump to solution
Or easy way.. you can do like this and remove "additional logic"
```php
Forms\Components\Section::make()
->relationship('profile')
->schema([...
9 Replies
What relationship are you using for both model ? Probably you can apply by using fieldset or relation manager
One to one relationship
Like user hasOne profile
Yes I did that but is not automatically saving to database table profile
Techinically I still need to update the createUser class
My issue now is I want to display the profile data if it is "edit" page and null if "create" page
You can customize like this
Thank you!
Solution
Or easy way.. you can do like this and remove "additional logic"
If you use like this, then you can remove all of this additional inside 'create' and 'edit' pages
Thank you I'll try
Seems working, ty!