PHP code example of cmsmaxinc / filament-system-versions
1. Go to this page and download the library: Download cmsmaxinc/filament-system-versions library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cmsmaxinc / filament-system-versions example snippets
use Cmsmaxinc\FilamentSystemVersions\FilamentSystemVersionsPlugin;
use Filament\Panel;
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugin(FilamentSystemVersionsPlugin::make());
}
use Cmsmaxinc\FilamentSystemVersions\FilamentSystemVersionsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugin(
FilamentSystemVersionsPlugin::make()
->navigationLabel('System Info')
->navigationGroup('Administration')
->navigationIcon('heroicon-o-cpu-chip') // Or use Enum
->navigationSort(10)
);
}
use Cmsmaxinc\FilamentSystemVersions\Commands\CheckDependencyVersions;
// In your Console Kernel or service provider
Schedule::command(CheckDependencyVersions::class)->daily();
use Cmsmaxinc\FilamentSystemVersions\Filament\Widgets\DependencyWidget;
->widgets([
DependencyWidget::class
])
use Cmsmaxinc\FilamentSystemVersions\Filament\Widgets\SystemInfoWidget;
->widgets([
SystemInfoWidget::class
])
use Cmsmaxinc\FilamentSystemVersions\Filament\Widgets\DependencyStat;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
class CustomStats extends BaseWidget
{
protected function getStats(): array
{
return [
DependencyStat::make('Laravel')
->dependency('laravel/framework'),
DependencyStat::make('FilamentPHP')
->dependency('filament/filament'),
DependencyStat::make('Livewire')
->dependency('livewire/livewire'),
];
}
}