alcales/laravel-docuware

Docuware SDK Laravel

v0.0.1 2020-11-16 15:58 UTC

This package is auto-updated.

Last update: 2024-09-20 03:53:49 UTC


README

您可以通过composer安装此包

composer require alcales/laravel-docuware

该包将自动注册自己。

可选地,您可以发布配置文件

php artisan vendor:publish --provider="ALCales\Docuware\DocuwareServiceProvider" --tag="config"

以下是它的样子

return [

    'url_root' => env('DOCUWARE_URL'),

    'user' => env('DOCUWARE_USER'),

    'password' => env('DOCUWARE_PASSWORD'),

];

您可以在.env文件中通过环境变量定义凭证

DOCUWARE_URL=
DOCUWARE_USER=
DOCUWARE_PASSWORD=

用法

初始化。

$docuware = new Docuware($urlHost, $user, $password);

// If the credentials are not defined in the constructor, the ones established in the environment variables of the `.env` file will be obtained.
$docuware = new Docuware();

主要功能

$documentListArray = $docuware->getDocumentsList('your_gabinet_id');

$downloadedSuccessfully = $docuware->downloadDocument('your_gabinet_id', 'your_document_id', 'your_storage_path');

$fields = [
    new DocuwareField('Name', 'Alejandro', 'String'),
    new DocuwareField('Ages', 28, 'Int'),
];

$updateSuccessfully = $docuware->updateIndexValues('your_gabinet_id', 'your_document_id', $fields);