Closed guiofranca closed 1 year ago
I could get it to work by changing the line https://github.com/filamentphp/filament/blob/3.x/packages/tables/src/Actions/CreateAction.php#L66C39-L66C39 to:
if (! $relationship || $relationship instanceof HasManyThrough) {
$record->save();
return $record;
}
I don't know how it would affect other features.
Please submit a PR if you can
Package
filament/filament
Package Version
3.0.8
Laravel Version
10.17.1
Livewire Version
No response
PHP Version
8.2.8
Problem description
When trying to save a model using a HasManyThrough relation in the Relation Manager the application throws an exception.
https://flareapp.io/share/W7z8XNVm
Expected behavior
It was expected to save the model.
Steps to reproduce
There are instructions on the reproduction repository.
The error also happens on the demo page under
Customers->Payments
. Pick a Customer with any Orders placed and try to add a Payment. https://demo.filamentphp.com/shop/customersReproduction repository
https://github.com/guiofranca/relation-manager-error
Relevant log output
No response