Regioagenda in sidebar
This commit is contained in:
@@ -44,6 +44,11 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=3'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update calendar items
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('regioagenda.json', file_get_contents($this->API_URL . 'agenda/overzicht'));
|
||||
})->everyMinute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,6 +58,9 @@ class Controller extends BaseController
|
||||
View::composer('widgets.laatstepodcasts', function($view) {
|
||||
$view->with('data', $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
|
||||
});
|
||||
View::composer('widgets.regioagenda', function($view) {
|
||||
$view->with('data', $this->getDataFromFileAndConvert('regioagenda.json', [], '\Model\CalendarEvent'));
|
||||
});
|
||||
View::composer('widgets.menu', function($view) {
|
||||
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
|
||||
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem', 3))
|
||||
|
||||
Reference in New Issue
Block a user