Пример #1
0
 public function countsAction()
 {
     $json = array();
     $json['propertyCount'] = Estate::count();
     $json['likesCount'] = Estate::sum(array("column" => "likes"));
     echo json_encode($json);
 }