awcodes/filament-versions
Display your framework and package versions in Filament: a small sidebar footer panel plus an optional dashboard/widget for pages. Easy plugin + widget registration, with option to disable the navigation view. Supports Filament v2–v5 via matching package versions.
composer require awcodes/filament-versions
PanelProvider (e.g., app/Providers/Filament/AdminPanelProvider.php), add:
use Awcodes\Versions\VersionsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
VersionsPlugin::make(),
]);
}
resources/css/filament/filament.css):
@source '../../../../vendor/awcodes/filament-versions/resources/**/*.blade.php';
Display default framework versions (Laravel, PHP, Filament) in the Filament sidebar navigation footer. No additional configuration is needed beyond installation.
Default Integration:
Dashboard Widget:
->widgets([
\Awcodes\Versions\VersionsWidget::class,
])
Custom Version Items:
VersionProvider for custom versions (e.g., API clients, libraries):
class MyCustomVersionProvider implements VersionProvider {
public function getName(): string { return 'My Library'; }
public function getVersion(): string { return '2.3.1'; }
}
VersionsPlugin::make()
->items([new MyCustomVersionProvider()])
Conditional Rendering:
VersionsPlugin::make()
->hasNavigationView(false)
VersionsPlugin::make()
->hasDefaults(false)
widgetColumnSpan and widgetSort methods to adjust widget placement:
VersionsPlugin::make()
->widgetColumnSpan('full') // Full-width widget
->widgetSort(2) // Position in dashboard
laravel, php, filament). Extend via Filament’s translation system if needed.topNavigation, the sidebar widget appears at the bottom of page content. No extra config is required.Theme Dependency:
@source directive in your existing theme CSS.Version Provider Conflicts:
VersionProvider names/versions may clash with defaults (e.g., naming a custom item "Laravel").Laravel Framework) and validate versions programmatically:
public function getVersion(): string {
return version_compare($this->getVersion(), '10.0.0', '>=') ? '10.x' : $this->getVersion();
}
Widget Visibility:
topNavigation is enabled and hasNavigationView(false) isn’t set.// For sidebar panels
->hasNavigationView(true)
// For top-nav panels
->hasNavigationView(false)
CSS Isolation:
.versions-widget { @apply your-custom-styles; }
VersionProvider implementations are correctly registered in the plugin. Use dd() in getVersion() to verify values.widgets() array in your Panel configuration.@source directive path is correct (relative to your theme CSS file).getVersion():
public function getVersion(): string {
return file_get_contents('https://api.example.com/version');
}
->items(fn () => [
new MyCustomVersionProvider(),
env('APP_ENV') === 'local' ? new DebugVersionProvider() : null,
])
resources/views/vendor/awcodes/versions/...).VersionProvider implementations with heavy logic (e.g., network calls) may impact load times. Cache results if needed:
public function getVersion(): string {
return cache()->remember('my_library_version', now()->addHours(1), fn() => '2.3.1');
}
How can I help you explore Laravel packages today?