FuelPHP Bin
public function action_index($institution){ $query = \Model_Institution::query()->where('id',$institution)->related(array('stds','students')); if(\Input::get('q')){ $query->where('students.name','like','%'.\Input::get('q').'%'); } if(\Input::get('gender')){ $query->where('students.gender',\Input::get('gender')); } if(\Input::get('std')){ $query->where('students.std',\Input::get('std')); } if(\Input::get('status')){ $query->where('students.status',\Input::get('status')); } $institution = $query->get_one(); $data = array( 'institution' => $institution, ); $this->theme->get_template()->set('title', 'Students'); $this->theme->get_template()->set('content', $this->theme->view('students/index',$data)); $this->theme->get_template()->set('sub_title', 'Students Management Area'); $this->theme->get_template()->set('bc', array( array( 'link'=>'backend/students', 'title'=> 'Students' ) )); }