public function highChartData($request) { return collect(['all', 'failureMode', 'assembly', 'environment', 'machine', 'man', 'material', 'process'])->flatMap(function ($type) use($request) { return [$type == 'all' ? 'pod' : $type => $this->collection(Info::pod($request->month, $request->year, $type))]; })->merge(['qdn' => $this->byAnnual()]); }