/** * Menghapus record tertentu berdasarkan column id. * * @param integer $id * @return bool */ public function delete($id) { try { $this->db->delete($this->table, [$this->primaryKey, '=', $id]); return true; } catch (\Exception $e) { throw new \Exception("Cannot delete record."); } }