API_URL = env('API_URL', 'http://api.6fm.nl/'); // 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)); })->everyMinute(); // $schedule->command('inspire') // ->hourly(); } /** * Register the Closure based commands for the application. * * @return void */ protected function commands() { require base_path('routes/console.php'); } }