public function get_list() { $stations = Model_Station::find('all'); foreach ($stations as $i => $obj) { $stations[$i] = $obj->to_array(); } return $this->response(json_encode($stations)); }
public function post_save_from_station() { // 自分の位置を取得する $state = Model_Userstate::find($this->_user->id); $state->now_station_id; $current_station = Modl_Station::find()->where('station_id', $state->now_station_id); // $list = Model_Station::find()->where('base_line', $state->base_line)->where('station_index', '>', $current_station->station_index); echo json_encode($list); }