PHP code example of pschilly / filament-dcs-server-stats

1. Go to this page and download the library: Download pschilly/filament-dcs-server-stats 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/ */

    

pschilly / filament-dcs-server-stats example snippets


$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
])

use Pschilly\FilamentDcsServerStats\Pages as DCSServerBotPages;

$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
    ->serverSelector(false)
]);

use Pschilly\FilamentDcsServerStats\Pages as DCSServerBotPages;

$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
    ->pages([
        DCSServerBotPages\Leaderboard::class,
        DCSServerBotPages\PlayerStats::class,
        DCSServerBotPages\Squadrons::class, // Requires that you have the `squadrons` feature enabled within the DCS Server Bot
        DCSServerBotPages\Servers::class,
    ]);
])

use Pschilly\FilamentDcsServerStats\Widgets as DCSServerBotDashboardWidgets;

$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
    ->dashboard(false) // Will disable the DCSServerBotDashboardWidgets\TopSquadrons::class, // Requires that you have the `squadrons` and `credits` features enabled within the DCS Server Bot
    ]);
])


$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
    ->leaderboardColumns([
        'deaths',
        'kdr',
        'credits',
        'playtime'
    ]);
])

use Pschilly\FilamentDcsServerStats\Widgets\PlayerStats as DCSServerBotPlayerStatsWidgets;

$panel
->plugins([
    \Pschilly\FilamentDcsServerStats\FilamentDcsServerStatsPlugin::make()
    ->playerStatsWidgets([
        DCSServerBotPlayerStatsWidgets\CombatChart::class,
        DCSServerBotPlayerStatsWidgets\ModuleChart::class,
        DCSServerBotPlayerStatsWidgets\PveChart::class,
        DCSServerBotPlayerStatsWidgets\PvpChart::class,
        DCSServerBotPlayerStatsWidgets\SortieChart::class
    ]);
])
css
@source '../../../../vendor/pschilly/filament-dcs-server-stats/resources/**/*.blade.php';
bash
php artisan vendor:publish --tag="filament-dcs-server-stats-views"