コード例 #1
0
 /**
  * Delete a trip
  *
  * @param  integer $tripId The trip id
  * @return void
  */
 public function delete($tripId)
 {
     /* @var $trip \App\Models\Trip */
     $trip = $this->_tripsRepo->getById($tripId);
     $data = array('deleted' => false);
     if (empty($trip) === true) {
         $this->respond($data, 400, 'Invalid trip selected');
     }
     $this->respond(array('deleted' => $trip->delete()));
 }
コード例 #2
0
 /**
  * List action - lists airports in alphabetical order
  */
 public function all()
 {
     $this->respond($this->_airportRepo->getAll());
 }