get(); if (0 === $set->count()) { $this->info('All budget limits are OK.'); return 0; } $count = BudgetLimit::where('amount', '<', '0')->update(['amount' => DB::raw('amount * -1')]); $this->info(sprintf('Fixed %d budget limit(s)', $count)); return 0; } }