Is it possible to use relationships inside my form when extending the Auth\Register class?
I'm trying to extend
Filament\Pages\Auth\Register
because i want to add more fields to my register form. I'm trying to use a Fieldset with ->relationship but I'm getting Call to a member function playerProfile() on null
I've worked with Filament in the past and I've read the documentation, but I feel like either I'm missing something obvious or this is not possible out of the box?
My code:
/app/Filament/Pages/Auth/Register.php
/app/Models/User.php
/app/Models/PlayerProfile.php
Solution:Jump to solution
add
->model(User::class)
in the form
```php
protected function getForms(): array
{...3 Replies
Solution
add
->model(User::class)
in the form
thanks a lot for this, this was it - I thought I tried this but I must have used wrong syntax or something, then I assumed it was linked to the User model by default - thanks again for your help!
NP.. nice nickname btw π