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.
1 Reply
Solution
Have you tried something like this?