PHP code example of rbibby / laravel-dashboard-news-tile

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

    

rbibby / laravel-dashboard-news-tile example snippets


// config/dashboard.php

return [
    // ...
    'tiles' => [
        'news' => [
            'api-key' => env('NEWS_API_KEY'),
            'country-code' => 'gb',
            'number-of-articles' => 10,
            'refresh-interval-in-seconds' => 60,
        ],
    ],
];

// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(\RBibby\NewsTile\FetchDataFromApiCommand::class)->everyMinute();
}