PHP code example of aglipanci / laravel-dashboard-forge-tile

1. Go to this page and download the library: Download aglipanci/laravel-dashboard-forge-tile 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/ */

    

aglipanci / laravel-dashboard-forge-tile example snippets


// in config/dashboard.php

return [
    // ...
    'tiles' => [
         'forge' => [
              'token' => env('FORGE_API_TOKEN'),
              'servers' => [
                   'refresh_interval_in_seconds' => 3600
               ],
              'recent_events' => [
                    'refresh_interval_in_seconds' => 60
              ],
         ],
    ],
];

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    $schedule->command(\aglipanci\ForgeTile\Commands\FetchForgeServersCommand::class)->hourly();
    $schedule->command(\aglipanci\ForgeTile\Commands\FetchForgeRecentEventsCommand::class)->everyMinute();
}
bash
php artisan vendor:publish --provider="aglipanci\ForgeTile\ForgeTileServiceProvider" --tag="dashboard-forge-tile-views"