1 year ago

Use ONE form for 2 resources

Posted 1 year ago by lorenzoberti

I'm new on Laravel Nova. I'm trying to build a User form. In this moment I have these models: User, UserDetail

In User I have: email, password, username. In UserDetail I have: Name, Lastname, Gender, Number, etc.

Now I would create ONE form for user. Why I'm focusing on ONE? Because in my User Resource fields I have:

HasOne::make("UserDetail", "details")

But For set user detail I have 2 form: One for User data (username, password, email) And after save the user I can set detail.

So I don't want compile 2 different form for 1 resource.

I have found this package, but seems broke:


And the fields UserDetails doens't shown.

So is there any other way for add text field from relationship and merge in same Form?

Please sign in or create an account to participate in this conversation.