Empty model on mountUsing
Hi - I am building an EditAction on a Resource and want to use
mountUsing()
. I followed the docs at https://filamentphp.com/docs/2.x/tables/actions#filling-default-data and made my function look like this:
But the modal it not beeing filled up. The form-elements themselfs are there, but have no values. DeliveryChannel is the Model bound to the Resource. A dd($deliveryChannel)
revealed that the function receives an empty model.
Does anyone have an idea on how to get the actual model I've clicked on the table?Filament
Actions - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
4 Replies
Try
->mountUsing(function (Forms\ComponentContainer $form, DeliveryChannel $record){
insteadSolution
The parameter injection is based on the variable names
Thanks - you're the man! π