db = new FilterModel(); } public function writeFilter($data) { $results = $this->db->insertFilter($data); return json_encode($results); } public function deleteFilter($id) { $results = $this->db->deleteFilter($id); return json_encode($results); } }