* 생성 $validation = Validation::factory(array( 'name' => 'Lysender', 'email' => 'lysender@troy.org', 'address' => 'City of Troy', 'zip' => '1234' )); * 룰 추가 // Adding a rule looks the same syntax but let's dig deeper later on $validation->rule('name', 'not_empty'); $validation->rule('name', 'min_length', array(':value', 4)); // Some custom callback function function is_visitor_email_unique($visit..
표현 예제 Sql UPDATE `pages` SET `views` = views + 1 WHERE `id` = 1 변환 DB::update('pages') ->set(array('views' => DB::expr('views + 1'))) ->where('id', '=', 1)->execute(); Transactions BEGIN WORK; DB::query(NULL, "BEGIN WORK")->execute(); DB::query(NULL, "BEGIN WORK")->execute(); // Array of Page Data $page_data = array( 'id'=> NULL, 'title'=> 'My New Page', ); $page = (bool) DB::insert('pages', arr..
1. Request Routing $page_name = Request::instance()->param('page'); $this->request->response = View::factory('page/'.$page_name) ->bind('menu', $menu); $menu = Request::factory('static/menu')->execute()->response; view 안에서의 사용 execute()->response ?> 2. Route 의 흐름을 무시하도록 라우팅 기본 controller/action/id 이라면 controller/action/id/and/anything/else/you/want/to/add/at/random 요렇게 하려면 Route::set('default', ..