示例#1
0
 /**
  * stage一覧を返す、引数に数字が渡されていた場合は特定のステージ情報を返す
  *
  * @param Mixed $num ステージ番号
  *
  */
 public function action_stages($num = null)
 {
     if (!$num) {
         $stages = Model_Stage::find('all');
         $this->response($stages);
         return;
     }
     $stage = Model_Block::find_by('stage_id', '1');
     $this->response($stage);
 }
示例#2
0
 public function post_write()
 {
     $title = Input::post('title');
     Model_Stage::forge(['title' => $title])->save();
 }