getOwners(); return view('kpi.dayDetailCustomer.index', compact('owners')); } public function workCoefficientDayStatIndex() { $userWorkgroups = \App\UserWorkgroup::query()->select(["id", "name"])->get(); return view('kpi.workCoefficientDayStat.index', compact('userWorkgroups')); } public function ownerPcsReport() { $ownerCodes = $this->getOwners()->pluck('code'); return view('kpi.ownerPcsReport.index', compact('ownerCodes')); } public function logisticsPunctuality() { $ownerIds = $this->getOwners()->pluck('id'); return view('kpi.logisticsPunctuality.index', compact('ownerIds')); } public function orderOperationLog() { $ownerIds = $this->getOwners()->pluck('id'); return view('kpi.orderOperationLog.index', compact('ownerIds')); } /** * @return Builder[]|Collection */ public function getOwners() { return \App\Owner::query()->select(['id', 'name', 'code']) ->whereIn('id', app("OwnerService")->getQuery())->get(); } }