Extending FIlament register Pages error when use relationship like select

so i want to make my user registration pages extend from filament based registration page, why i want to extend? i want to add new select for selecting the school(as tenant, the school is the tenant) here's the code, already setting a form model anyways here's the error when i submit the form, before i set the form model i cant access the registration page, but when i set the form model no error when accessing the page, but the error comes after submit the form, cant save to the relationship i check the Filament Base Register Class. i check the method inside Filament register class and inside that already containing
$this->form->model($user)->saveRelationships();
$this->form->model($user)->saveRelationships();
as the docs says thts should be there if we need to save the relationship did i miss something? thank you
No description
No description
3 Replies
christmex
christmex4w ago
hey, guys is there any idea? thank you
Expecto Patronum
The error seems like user table doesnt have column school id ?
christmex
christmex4w ago
yes, the school_id is in the pivot tabel it should saving in tht pivot tabel, as the docs notice
$this->form->model($user)->saveRelationships();
$this->form->model($user)->saveRelationships();
that code can handle for relationship