Getting Started: Where is the Treatments Form?

I'm going through https://filamentphp.com/docs/3.x/panels/getting-started and stopped at 'Introducing widgets'. However, I do not see the Treatments form that I added the code for. When I go to Edit Patient, I see an empty list of Treatments but no way to add it. See screeshot:
No description
10 Replies
PabloZagni
PabloZagni5mo ago
Try add public function isReadOnly(): bool { return false; } In the TreatmentRelationmanager
heat23.
heat23.OP5mo ago
I added that, but still not seeing a way to add Treatments
PabloZagni
PabloZagni5mo ago
When you click a row on the table, you should go to the VIEW action, where you can create Treatments. There, you should have a button to edit the Patient.
toeknee
toeknee5mo ago
You've setup the table but haven't yet added a createaction and a form for it or an attach action if you have a treatments table
heat23.
heat23.OP5mo ago
@toeknee Does the guide go through this or do I need to figure it out on my own
toeknee
toeknee5mo ago
The docs are not guides persay. They are documentation on functions not a complete solution to build. But I would assume so! Have a look at the demo app an also don't forget the apps at: https://laraveldaily.com/tag/filament?source=homepage
heat23.
heat23.OP5mo ago
Thanks @toeknee the demo app will help. Do you by change have an example of a table "Bulk Action" where you can make changes to a few fields (i.e. category, status, etc). All the exampels only have "Delete"
Dennis Koch
Dennis Koch5mo ago
Simplified version:
->form([/*... Field you want to overwrite here ...*/])
->action(fn ($record, $data) => $records->update($data))
->form([/*... Field you want to overwrite here ...*/])
->action(fn ($record, $data) => $records->update($data))
heat23.
heat23.OP5mo ago
Thanks @Dennis Koch . I have another question but will open a new thread
Want results from more Discord servers?
Add your server