/** * AJAX call, mencari Lead atau Prospect yang mempunyai Play ID * yang sesuai. * * @return array */ public function findLeadProspect() { $id = request('id'); $lead = $this->repo->findLead($id, $this->workingAreaId); $drillable = $this->repo->findDrillable($id, $this->workingAreaId); $postdrill = $this->repo->findPostdrill($id, $this->workingAreaId); $discovery = $this->repo->findDiscovery($id, $this->workingAreaId); if ($lead->isEmpty() && $drillable->isEmpty() && $postdrill->isEmpty() && $discovery->isEmpty()) { // Return null javascript object return '{}'; } return ['lead' => $lead, 'drillable' => $drillable, 'postdrill' => $postdrill, 'discovery' => $discovery]; }
/** * AJAX call, Mengambil data GCF pada Play tertentu. * * @return JSON */ public function getPlayGcf() { return PlayRepository::detail(request('playId')); }