dantart / yii2-holded
Yii 框架扩展,适用于 https://www.holded.com
1.0.5
2018-02-12 06:59 UTC
Requires
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2024-09-18 20:49:09 UTC
README
Yii 框架扩展,适用于 https://www.holded.com
安装
安装 macklus/yii2-holded 包包含以下两个步骤
步骤 1: 通过 composer 安装
安装此扩展的首选方式是通过 composer。
你可以运行
php composer.phar require --prefer-dist macklus/yii2-holded "*"
或者在你的 composer.json
文件的 require 部分添加
"macklus/yii2-holded": "~1.0"
到 require 部分中。
步骤 2: 运行迁移
你需要通过在你的框架目录下运行以下命令来安装所需的表格
php yii migrate/up --migrationPath=@vendor/macklus/yii2-holded/migrations
配置
在你的 web.php 配置文件中添加
'holded' => [
'class' => 'macklus\holded\Holded',
'apikey' => 'INSERT_HERE_YOUR_API_KEY',
'curl_debug' => false,
],
使用
你可以直接调用 holded 组件的任何函数,例如
Yii::$app->holded->createwaybill($somedata)
你可以查看文件以了解函数如何工作(这是一个待办任务)