Allowed memory exhausted while using fn($record) in hintAction
Hello,
On my basket editing page, I can see the customer (but aI can not change the customer) and would like to add a button to edit the customer's information in a modal on the same page.
I am using hintAction :
Do you know if there is another solution, or a way to fix it?
Thanks!
3 Replies
Does this only happen with Filament or on any Laravel route? Maybe you have a circular dependency.
It happens using filament default behavior. I have a custom scope file that could generate a circular dependancy but I commented it and still got this error...
Check this works:
->hintAction(
EditAction::make('updateCustomer')
->record(function($record) => {
dd($record);
})
->schema(CustomerForm::configure(\Filament\Schemas\Schema::make())->getComponents())
)
Then check:
->hintAction(
EditAction::make('updateCustomer')
->record(function($record) => {
dd($record->customer);
})
->schema(CustomerForm::configure(\Filament\Schemas\Schema::make())->getComponents())
)