Home page and news page are finished

This commit is contained in:
Jorit Tijsen
2024-03-13 12:37:09 +01:00
parent 55aa88c0f6
commit 2895ba283b
58 changed files with 3713 additions and 31764 deletions

View File

@@ -27,39 +27,39 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
// $this->API_URL = env('API_URL', 'https://api.nhgooi.nl/');
//
// // Update latest news (3 items)
// $schedule->call(function() {
// 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'));
// Storage::disk('local')->put('zojuist.json', file_get_contents($this->API_URL . 'programma/schema/recent'));
// })->everyMinute();
//
// // Update latest podcasts (6 items)
// $schedule->call(function() {
// Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=6'));
// })->everyMinute();
//
// // Update calendar items
// $schedule->call(function() {
// Storage::disk('local')->put('regioagenda.json', file_get_contents($this->API_URL . 'agenda/overzicht'));
// })->everyMinute();
//
// // Update blogs
// $schedule->call(function() {
// Storage::disk('local')->put('blogs.json', file_get_contents($this->API_URL . 'blog/overzicht'));
// })->everyMinute();
//
// // Update featured images
// $schedule->call(function() {
// Storage::disk('local')->put('beelden.json', file_get_contents($this->API_URL . 'beelden/overzicht'));
// })->everyMinute();
$this->API_URL = env('API_URL', 'https://api.nhgooi.nl/');
// Update latest news (3 items)
$schedule->call(function() {
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'));
Storage::disk('local')->put('zojuist.json', file_get_contents($this->API_URL . 'programma/schema/recent'));
})->everyMinute();
// Update latest podcasts (6 items)
$schedule->call(function() {
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=6'));
})->everyMinute();
// Update calendar items
$schedule->call(function() {
Storage::disk('local')->put('regioagenda.json', file_get_contents($this->API_URL . 'agenda/overzicht'));
})->everyMinute();
// Update blogs
$schedule->call(function() {
Storage::disk('local')->put('blogs.json', file_get_contents($this->API_URL . 'blog/overzicht'));
})->everyMinute();
// Update featured images
$schedule->call(function() {
Storage::disk('local')->put('beelden.json', file_get_contents($this->API_URL . 'beelden/overzicht'));
})->everyMinute();
}
/**