PHP code example of michael4d45 / filament-system-info-widget
1. Go to this page and download the library: Download michael4d45/filament-system-info-widget 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/ */
michael4d45 / filament-system-info-widget example snippets
use Michael4d45\FilamentSystemInfo\Widgets\SystemInfoWidget;
class Dashboard extends \Filament\Pages\Dashboard
{
public function getWidgets(): array
{
return [
SystemInfoWidget::class,
];
}
}
SystemInfoWidget::make()
->heading('My System Info')
->packages([
[
'name' => 'laravel/framework',
'displayName' => 'Laravel',
'icon' => 'heroicon-o-cpu-chip',
'type' => 'packagist',
],
[
'name' => 'php',
'displayName' => 'PHP',
'icon' => 'heroicon-o-code-bracket',
'type' => 'php',
],
])
->showDeploymentInfo(true)
->pollingInterval('30s')
SystemInfoWidget::make()
->configure([
'packages' => [
[
'name' => 'laravel/framework',
'displayName' => 'Laravel Framework',
'icon' => 'heroicon-o-cpu-chip',
'type' => 'packagist',
],
[
'name' => 'filament/filament',
'displayName' => 'Filament Admin',
'icon' => 'heroicon-o-squares-2x2',
'type' => 'packagist',
],
],
'heading' => 'System Overview',
'pollingInterval' => '30s',
'showDeploymentInfo' => true,
'releaseInfoPath' => '.release-info',
])
return [
'packages' => [
[
'name' => 'laravel/framework',
'displayName' => 'Laravel',
'icon' => 'heroicon-o-cpu-chip',
'type' => 'packagist',
],
// Add your own packages...
],
'show_deployment_info' => true,
'heading' => 'System Information',
'polling_interval' => '60s',
];
SystemInfoWidget::make()
->showDeploymentInfo(false)
├── config/
│ └── filament-system-info.php
├── src/
│ ├── FilamentSystemInfoServiceProvider.php
│ └── Widgets/
│ └── SystemInfoWidget.php
├── composer.json
└── README.md