© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
رجل الجمبري

is it possible to access the live tableFilters from a widget?

e.g request()->query('tableFilters') only works on page load not when the filter options change.

class OrderStats extends BaseWidget
{

protected static ?string $pollingInterval = null;

protected $listeners = ['updateOrderStats' => '$refresh'];

protected function getCards(): array
{
$filters = request()->query('tableFilters');

$methods = [];

$orders = Order::with('OrderRows');

if(!empty($filters['paid']['isActive'])){
$orders->where('total_value', '>', 0)->where('unpaid_value', 0);
}
if(!empty($filters['refunded']['isActive'])){
$orders->where('refund', '>', 0);
}
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

Multiple tableFilters in a Widget
FilamentFFilament / ❓┊help
3y ago
Access tableFilters in resource
FilamentFFilament / ❓┊help
3y ago
Is it possible to add a widget inside a form or above it?
FilamentFFilament / ❓┊help
3y ago
How to access filter data from a widget?
FilamentFFilament / ❓┊help
3mo ago