This package offers a set of widgets to showcase the current system versions, including Composer dependencies.
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
You will need to create a custom theme for the styles to be applied correctly.
Make sure you add the following to your `tailwind.config.js file.
'./vendor/cmsmaxinc/filament-system-versions/resources/**/*.blade.php',
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,
],
],
];
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::call(CheckDependencyVersions::class)->daily();
This widget will display all outdated composer dependencies with the current version and the latest version available.
->widgets([
DependencyWidget::make(),
])
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'),
];
}
}
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>