runningUnitTests()) { return null; } if (Schema::hasTable('settings')) { $settings = Setting::first(); if ($settings->refresh_automatically) { $schedule->command(Refresh::class)->dailyAt('06:00'); } if ($settings->daily_reminder) { $schedule->command(Daily::class)->dailyAt(config('app.DAILY_REMINDER_TIME')); } if ($settings->weekly_reminder) { $schedule->command(Weekly::class)->sundays()->at(config('app.WEEKLY_REMINDER_TIME')); } } } /** * Register the Closure based commands for the application. * * @return void */ protected function commands() { require base_path('routes/console.php'); } }