How to get and use current model of view page within a widget?
I want t load stats of a model... hmm. thanks!
9 Replies
$getRecord()
?Undefined variable $getRecord
😄
Sorry, you can use getRecord in the view
How?
`
This is working in my StatsWidget, but not in ChartWidget.
This was easy... could you guide me on how I could have find it in documentation?
Thanks!
there isn't an example using a widget, but using a custom page
https://filamentphp.com/docs/3.x/panels/resources/custom-pages#using-a-resource-record
Thanks. Maybe an idea to add it to the documentation somewhere.
You can make a PR ✌️