diff --git a/app/Console/Commands/Optimise/OptimiseCommand.php b/app/Console/Commands/Optimise/OptimiseCommand.php index 82ccc08..941f421 100644 --- a/app/Console/Commands/Optimise/OptimiseCommand.php +++ b/app/Console/Commands/Optimise/OptimiseCommand.php @@ -77,17 +77,17 @@ private function makeForeground(Company $company) private function syncAll() { - $calendars = Caldav::all(); + $companies = Company::all(); if ($this->option('background')) { \Log::debug(self::BACKGROUND_MOD_MEX); $this->info(self::BACKGROUND_MOD_MEX); - foreach ($calendars as $calendar) - $this->makeBackground($calendar); + foreach ($companies as $company) + $this->makeBackground($company); \Log::debug(self::BACKGROUND_COMPLETED_MEX); $this->info(self::BACKGROUND_COMPLETED_MEX); } else - foreach ($calendars as $calendar) - $this->makeForeground($calendar); + foreach ($companies as $company) + $this->makeForeground($company); } /**