cmsmaxinc / filament-system-versions
A comprehensive Filament plugin that provides real-time visibility into all package versions within your Filament PHP application. This essential developer tool creates a centralized dashboard where you can instantly view, monitor, and track the current versions of all installed packages in your pro
Installs: 2 467
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 0
Forks: 4
Open Issues: 0
Requires
- php: ^8.2
- filament/filament: ^4.0.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
This package offers a set of widgets to showcase the current system versions, including Composer dependencies.
Installation
You can install the package via composer:
composer require cmsmaxinc/filament-system-versions
You can publish and run the migrations with:
php artisan vendor:publish --tag="filament-system-versions-migrations"
php artisan migrate
Translations
If you want to customize the translations, you can publish the translations file.
php artisan vendor:publish --tag="filament-system-versions-translations"
You can publish the config file with:
php artisan vendor:publish --tag="filament-system-versions-config"
This is the contents of the published config file:
return [ 'database' => [ 'table_name' => 'composer_versions', ], 'widgets' => [ 'dependency' => [ 'show_direct_only' => true, ], ], 'paths' => [ 'php_path' => env('PHP_PATH', ''), 'composer_path' => env('COMPOSER_PATH', ''), ], ];
Usage
Command
Note
Make sure you run this command atleast once to store the current composer dependencies.
To run the command to check for outdated composer dependencies, you can run the following command:
php artisan dependency:versions
But obviously, you don't want to run this command manually every time you want to check for outdated dependencies. So, you can use the command in your scheduler to run this command automatically.
Schedule::command(CheckDependencyVersions::class)->daily();
Custom Theme
You will need to create a custom theme for the styles to be applied correctly.
Make sure you add the following to your theme.css
file you created for the theme.
@source '../../../../vendor/cmsmaxinc/filament-system-versions/resources/**/*.blade.php';
DependencyWidget
This widget will display all outdated composer dependencies with the current version and the latest version available.
->widgets([
DependencyWidget::class
])
DependencyStat
Stat widget will display the installed version of the dependencies and the latest version available.
class StatsOverview extends BaseWidget { protected function getStats(): array { return [ DependencyStat::make('Laravel') ->dependency('laravel/framework'), DependencyStat::make('FilamentPHP') ->dependency('filament/filament'), ]; } }
Adding the widget to a blade view
To add the system versions widget to an existing blade view:
<x-filament-panels::page> @livewire(\Cmsmaxinc\FilamentSystemVersions\Filament\Widgets\DependencyWidget::class) </x-filament-panels::page>