Relationship in Form not saving on create action.

                Grid::make()
                    ->schema([
                        Forms\Components\Select::make('housing_id')
                            ->relationship('housing', 'type')
                            ->required(),
                        Forms\Components\Select::make('employment_id')
                            ->relationship('employment', 'type')
                            ->required(),
                    ]),


This is inside my form, When I create a new record - the options do populate and when I dd on the $data in the function "handleRecordCreation", the fields are occupied with valid IDs.

However, when I press to create, the values don't save. But if I go back in and edit that record and select options again, they do save that time. I dont have any custom logic to handle the records (I only added handleRecordCreation as a test to check the data, then removed it again)
Was this page helpful?