Filament v3 Resource does not fill the Edit form
Hello i integrated the Filament package into a existing Laravel 10 project.
When i followed the guide for the panels i discovered that after i have created a Resource ( when i filled the logic for the Table ) it doesn't fill the Edit form with the selected record.
My table looks like this (from the docs and demo on github )
And my Edit page is almost blank
Was looking around found some were doing with the
->record()
method so i tried
But didn't make a difference
So what do i need to do to fill my Edit form with the selected record ?15 Replies
You need to fill in your form in your resource if i am correct
https://filamentphp.com/docs/3.x/forms/fields/getting-started if you use the textInput for your name , then you could see the name in the edit
i do have the
make()
method on my text inputs in the form
So i need to add the name()
method also ?you do return the $form?
yes
hmmm thats a good one man, You don't need to add the name it isn't required. But it does create your records?
hmmm it flashesh but it doesn't create the record in the DB
If this is an EditPage in a Panel you don't need to do anything.
it is
i created a new AppPanleProvider
and when i typed the command for a new resource it asked me for witch panel i wanted the resource to be so i did select the app panel provider that i created
and all i did after was to fill the
$table
and the $form
Anything special about your Defect model? Can you share that code?
nothing special
This is my AppPanelProvider
Is
Varied
doing anything special?no it for generating the data in the DB
it has nothing to do with filament
Can you make it work with any other model?
Just to make sure
haven't tested with other resources yet