/** * 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())); }
/** * List action - lists airports in alphabetical order */ public function all() { $this->respond($this->_airportRepo->getAll()); }