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.
4 replies
How can I set a condition for a filter to be used on a resource table
I have a resource which has a filter that limits the displayed entries to those created by the logged in user. Is there a way to put a condition where this filter only takes effect if the logged in user is not an admin. Otherwise it should display all entries
6 replies