Widget Configuration plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Widget Configuration

Community

Configure Filament's widget polling interval and lazy-loading default once, globally, without editing every widget class by hand — while never touching a widget that already customizes either property itself.

Tags: Widget
Supported versions:
5.x 4.x 3.x
Jefferson Gonçalves avatar Author: Jefferson Gonçalves

Package health

Beta

Automated checks of this plugin's Composer package

100 / 100
Security 100
Maintenance 100
Ecosystem 100
15 checks
  • Passed: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Passed: Dependabot or Renovate configured
  • Passed: Dependency update cooldown configured
  • Passed: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
  • Passed: composer.lock not committed by library composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.2 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 13 hours ago

Documentation

Version:

Filament Widget Configuration

Buy Me A Coffee

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

Configure Filament's widget polling interval and lazy-loading default once, globally, without editing every widget class by hand — while never touching a widget that already customizes either property itself.

#Why this plugin exists

Filament hardcodes a default polling interval on every polling-capable widget (protected ?string $pollingInterval = '5s';) with no built-in way to change that default across an entire application. A PR adding a global Widget::configureUsing() hook for this was closed by the Filament maintainer, danharrin, because baking a global configureUsing() callback into core would silently override any widget's own customized $pollingInterval, with no clean way to preserve precedence.

This plugin solves the same problem from outside core, as an opt-in third-party plugin, with a precedence rule that never overrides a widget that has customized the behavior itself — the exact guarantee the upstream PR couldn't offer.

In a large project, changing the default polling interval or lazy-loading behavior otherwise means opening every single widget class by hand. This plugin lets you set both once, in config or in AppServiceProvider, and every widget that hasn't customized its own behavior inherits the new default automatically.

#How the precedence rule works

Before overriding a property, the plugin checks — via ReflectionProperty::getDeclaringClass() — whether that property still comes from Filament's own base class/trait (Filament\Widgets\*, Filament\Support\*). If it does, it's safe to override. If a widget subclass has redeclared the property itself, its declaring class is that subclass, and the plugin leaves it untouched.

On Filament 5, $isLazy (CanBeLazy) is still a static property, so it's overridden once, at boot time, on Filament's base Widget class — every subclass that hasn't redeclared it inherits the new default for free. $pollingInterval (CanPoll), however, is a non-static instance property, so it can't be pre-set for an entire class hierarchy; instead, the plugin registers a Livewire ComponentHook that applies the resolved default to each widget instance individually, on mount/hydrate, using the same declaring-class check per instance.

#Compatibility

Branch Filament
1.x 3.x
2.x 4.x
3.x 5.x

#Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-widget-configuration:"^3.0"

Optionally publish the config file:

php artisan vendor:publish --tag=filament-widget-configuration-config

#Usage

By default the plugin auto-applies on every request using config/filament-widget-configuration.php — no panel wiring required.

return [
    'polling_interval' => env('FILAMENT_WIDGET_CONFIGURATION_POLLING_INTERVAL', '5s'),
    'lazy' => env('FILAMENT_WIDGET_CONFIGURATION_LAZY', true),
];

Set polling_interval to null to disable polling by default across the app.

If you prefer to configure it in code, use WidgetConfigurationPlugin fluently — e.g. from AppServiceProvider::boot(), registered on your panel:

use JeffersonGoncalves\Filament\WidgetConfiguration\WidgetConfigurationPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(
            WidgetConfigurationPlugin::make()
                ->pollingInterval('30s')
                ->lazy(false)
        );
}

Fluent values always win over the config file. Either way, a widget that already sets its own $pollingInterval or $isLazy keeps its own value.

#Testing

composer test

#Changelog

Please see CHANGELOG for more information on what has changed recently.

#Contributing

Please see CONTRIBUTING for details.

#Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

#Credits

#License

The MIT License (MIT). Please see License File for more information.

The author

Jefferson Gonçalves avatar Author: Jefferson Gonçalves

I'm a Full Stack PHP Developer from Assis, SP, Brazil with over 18 years of hands-on experience building robust platforms, managing server infrastructures, and crafting scalable solutions for businesses of all sizes.

My passion lives in the open source world — I actively maintain 20+ Filament plugins and a growing collection of Laravel packages used by thousands of developers worldwide. I believe great software should be accessible to everyone.

Plugins
36
Stars
197

From the same author

Scanner Guard plugin thumbnail

Scanner Guard

Filament UI for jeffersongoncalves/laravel-scanner-guard: list, filter and unban vulnerability-scanner IPs directly from your admin panel. This plugin ships a read-only Resource over the scanner_guard_bans table, an active/expired filter, and unban / bulk unban actions.

Jefferson Gonçalves avatar Author: Jefferson Gonçalves
100 / 100 package health score out of 100
0 stars
Tag: Widget Tag: Analytics
Dark mode ready Multilingual support
Free
Get it now
Short URL plugin thumbnail

Short URL

A complete Filament v5 admin layer for jeffersongoncalves/laravel-short-url — the headless core package that owns the models, migrations, redirect pipeline, tracking and every business rule. This package duplicates none of that: it's the presentation layer (Resources, Pages and Filament components) built on top of the core's Facade and contracts.

Jefferson Gonçalves avatar Author: Jefferson Gonçalves
100 / 100 package health score out of 100
3 stars
Tag: Analytics Tag: Widget
Dark mode ready Multilingual support
Free
Get it now
TeamKit v5 plugin thumbnail

TeamKit v5

Teamkit is a robust starter kit, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.

Jefferson Gonçalves avatar Author: Jefferson Gonçalves
97 / 100 package health score out of 100
6 stars
Tag: Kit
Dark mode ready Multilingual support
Free
Get it now
Ban plugin thumbnail

Ban

Ban and unban any Eloquent model directly from your Filament panel. This package wraps cybercog/laravel-ban and ships ready-to-use actions, bulk actions, an icon column and a status filter for your Filament resources and tables. Inspired by cybercog/laravel-nova-ban.

Jefferson Gonçalves avatar Author: Jefferson Gonçalves
100 / 100 package health score out of 100
0 stars
Tag: Action
Dark mode ready Multilingual support
Free
Get it now