Is it possible to implement HasOne relationship in Registration page?

I am trying to register the user with overriding default Register pages to have Wizard and Fieldset. Is it possible or not?
Forms\Components\Fieldset::make()
->relationship('userDetail')
->schema([
Wizard\Step::make('Data Diri')
->schema([
Forms\Components\TextInput::make('name')
->label('Nama Lengkap')
->required(),
Forms\Components\Select::make('province_id')
->label('Provinsi')
->options([]),
]),
]),
Forms\Components\Fieldset::make()
->relationship('userDetail')
->schema([
Wizard\Step::make('Data Diri')
->schema([
Forms\Components\TextInput::make('name')
->label('Nama Lengkap')
->required(),
Forms\Components\Select::make('province_id')
->label('Provinsi')
->options([]),
]),
]),
4 Replies
LeandroFerreira
LeandroFerreira8mo ago
what is the issue?
Garadit
GaraditOP8mo ago
Sorry, I can't use fieldset on my CustomRegisterPage. It throws an error "Call to a member function userDetail() on null", I guess because it cannot load the user model. This is the flare debug query form: SELECT * FROM sessions WHERE id = 0dOyTEsseUdHmuiqcxDYjJOekQMFSE3dzKquHkj9 limit 1 Or maybe I missed something.
Garadit
GaraditOP8mo ago
Thank you very much, the error is gone now ✨
Want results from more Discord servers?
Add your server