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