© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
gilbert.weboptimizers_98158

Adding a resource widget to an infolist viewentry/blade file

I created a resource widget which displays a barchart. It works as intended when using the getHeaderWidgets() function on the resource pages. I created an infolist on the resource entry's view page which uses a blade file to display some information. The problem is that if i were to use @livewire(\App\Filament\Resources\TestResource\Widgets\TestWidget::class) for example, it loads the widget but the widget no longer detects the current resource that is being displayed ($this->record is null). I was wondering if there's a way to make a call to the widget while maintaining the link to the current resource entry so I can display the barchart for whatever entry a user is viewing.
Solution
Have you tried something like this?
@livewire(TestWidget::class, ['record' => $getRecord()])
@livewire(TestWidget::class, ['record' => $getRecord()])
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

Adding a widget to a non-resource page
FilamentFFilament / ❓┊help
2y ago
Adding widget in a page resource
FilamentFFilament / ❓┊help
3y ago
Widget in infolist (view / resource ) page
FilamentFFilament / ❓┊help
13mo ago
Can a custom infolist ViewEntry have a FilamentTable?
FilamentFFilament / ❓┊help
3y ago