option('date') ? Carbon::parse($this->option('date')) : Carbon::yesterday(); $daily = $agg->rebuildDailyCollectionStats($date); $weekly = $agg->rebuildWeeklyRoutePerformance($date); $monthly = $agg->rebuildMonthlyStoreSales($date); $this->info(sprintf( 'Aggregated for %s — daily:%d weekly:%d monthly:%d', $date->toDateString(), $daily, $weekly, $monthly, )); return self::SUCCESS; } }