PHP code example of vinevax / laravel-dashboard-uptime-robot-tile

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

    

vinevax / laravel-dashboard-uptime-robot-tile example snippets


// in config/dashboard.php

return [
    // ...
    'tiles' => [
        /* Monitors should be an array with ids of your monitors you want to display */
        'uptimerobot' => [
            'key' => env('UPTIMEROBOT_KEY'),
            'blade' => 'multiple', // Or `multiple` for alternative tile
            'monitors' => [],
            'monitor_types' => [
                1 => 'URL',
                2 => 'Keyword',
                3 => 'Ping',
                4 => 'Port',
                5 => 'Heartbeat'
            ],
            'uptime' => 1 // Set to 0 if fetching from Uptime Robot API lags
        ]   
    ]   
];

    // in app/console/Kernel.php
  
        protected function schedule(Schedule $schedule)
        {
            $schedule->command(\VineVax\UptimeRobotTile\Commands\FetchUptimeRobotDataCommand::class)->everyFiveMinutes();
        }
dashboard.php