© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
erigra.

Access current record within Widget

Hey, I have a resource like ProductResource and I have an EditProduct page. Within EditProduct I have a Widget like ProductWidget. When on the edit page of that product like /product/1, how can I access the current record (1) from the Widget model? Can't seem to find anything about it in the docs. Thank you.
Solution
Try to declare public ?Model $record = null; in the widget class, you will have access to the EditProduct record
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Access current record data from within getRelations
FilamentFFilament / ❓┊help
2y ago
Repeater access current $record
FilamentFFilament / ❓┊help
3y ago
Problem in accessing widget current record
FilamentFFilament / ❓┊help
2y ago
Access record from Tab Widget
FilamentFFilament / ❓┊help
2y ago