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);
}
Was this page helpful?