public function leads() { $call = new Call(); $total_calls = $call->total(); $calls = array('total_calls_lifetime' => $total_calls); $leads = array('calls' => $calls); return Response::json($leads); }
protected function getLeadsData($from, $to) { $total_calls_lifetime = Call::count('*'); $total_calls = Call::from($from)->to($to)->count('*'); //print_r(\DB::getQueryLog()); $calls_data = array('total_calls' => $total_calls, 'total_calls_lifetime' => $total_calls_lifetime); $leads = array('calls' => $calls_data); return $leads; }
/** * Get all of the awards info by ID. * * @param int $callId * * @return Collection */ public function byId($calldId) { return Call::find($callId); }