function type_delete($id = '', $page = '') { $type = new Training_type(); $type->get_by_id($id); $type->delete(); Session::flash('msg', 'Training Type Deleted!'); return Redirect::to('training_manage/type/' . $page, 'refresh'); }