Example #1
0
 /**
  * Finds all open trucks that have tweeted to us and their geo coords
  */
 public function actionTrucks()
 {
     $trucks = Trucks::get_all_open_and_located_trucks();
     if (count($trucks)) {
         $this->sendJsonResponse(array('status' => 'success', 'data' => $trucks));
     } else {
         $this->sendJsonResponse(array('status' => 'fail', 'data' => 'No Trucks Found!'));
     }
 }