/** * Execute the console command. * * @return mixed */ public function fire() { $events = $this->schedule->events(); if (count($events) == 0) { $this->info('No tasks scheduled'); return; } if ($this->option('cron')) { $this->outputCronStyle($events); return; } $this->outputTableStyle($events); }
/** * Get the collection of events. * * @param Schedule $schedule * * @return Collection */ private function getEvents(Schedule $schedule) { return new Collection($schedule->events()); }