Sidebar widgets
This commit is contained in:
@@ -31,18 +31,19 @@ class Kernel extends ConsoleKernel
|
||||
|
||||
// Update latest news (3 items)
|
||||
$schedule->call(function() {
|
||||
$latest_news = json_decode(file_get_contents($this->API_URL . 'nieuws/overzicht?pagina=1&aantal=3'));
|
||||
|
||||
$news = [];
|
||||
foreach($latest_news->news as $item_data)
|
||||
{
|
||||
$news[] = new \Model\NewsItem($item_data);
|
||||
}
|
||||
|
||||
Storage::disk('local')->put('laatste_nieuws.json', json_encode($news));
|
||||
Storage::disk('local')->put('laatste_nieuws.json', file_get_contents($this->API_URL . 'nieuws/overzicht?pagina=1&aantal=3'));
|
||||
Storage::disk('local')->put('populair_nieuws.json', file_get_contents($this->API_URL . 'nieuws/populair'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update now / later
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('nu_straks.json', file_get_contents($this->API_URL . 'programma/schema/nustraks'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update latest podcasts (3 items)
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=3'));
|
||||
})->everyMinute();
|
||||
// $schedule->command('inspire')
|
||||
// ->hourly();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user