FilamentF
Filament3y ago
Finn

Access relationship data in mutateFormDataBeforeCreate

I have created a Repeater that goes into another model 'invoice_rows' like this:
Forms\Components\Repeater::make('invoice_rows')->label('Factuur regels')->relationship('row')
with the ->relationship('row') function.

But in my resource Create file (CreateAdminInvoices.php) I use protected function mutateFormDataBeforeCreate(array $data) and I want to access the form data of the relationship there as well, but that's not included in the $data variable. How do I make that accessible there as well?
Was this page helpful?