function delete() { $id = $this->uri->segment(4); $adminrole = new adminrole($id); if (!$adminrole->exists()) { show_404(); } $adminrole->delete(); redirect($this->admin . 'adminroles/list_all/'); }