PHP code example of filaforge / filament-system-tools

1. Go to this page and download the library: Download filaforge/filament-system-tools 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/ */

    

filaforge / filament-system-tools example snippets


use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other configuration
        ->plugin(\Filaforge\SystemTools\SystemToolsPlugin::make());
}

// config/system-tools.php
return [
    'enabled' => env('SYSTEM_TOOLS_ENABLED', true),
    'allowed_tools' => [
        'system_info' => true,
        'process_management' => true,
        'service_control' => true,
        'file_management' => true,
        'network_tools' => true,
        'log_viewer' => true,
        'performance_monitoring' => true,
        'user_management' => true,
        'backup_tools' => true,
        'maintenance_tasks' => true,
    ],
    'restricted_directories' => [
        '/etc', '/var/log', '/home', '/root'
    ],
    'allowed_commands' => [
        'ps', 'top', 'htop', 'systemctl', 'service',
        'ls', 'cat', 'tail', 'head', 'grep'
    ],
    'log_retention_days' => env('SYSTEM_TOOLS_LOG_RETENTION', 30),
    'max_processes' => env('SYSTEM_TOOLS_MAX_PROCESSES', 100),
];

// remove ->plugin(\Filaforge\SystemTools\SystemToolsPlugin::make())
bash
# Publish provider groups (config, views, migrations)
php artisan vendor:publish --provider="Filaforge\\SystemTools\\Providers\\SystemToolsServiceProvider"

# Run migrations
php artisan migrate
bash
php artisan route:list | grep system-tools
bash
php artisan optimize:clear
bash
composer remove filaforge/system-tools
php artisan optimize:clear