Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 /**
  * Get all of the awards info by ID.
  *
  * @param int $callId
  *
  * @return Collection
  */
 public function byId($calldId)
 {
     return Call::find($callId);
 }