public function attachFiles($id, $table, $files)
    {
        foreach ($files as $file) {
            if (!empty($file)) {
                $this->attachFile($id, $table, $file);
            }
        }
    }