imagina / iquote-module
1.0.10
2020-05-18 20:15 UTC
Requires
- php: >=7.0.0
- composer/installers: ~1.0
- idavoll/core-module: ~3.0
- imagina/icurrency-module: >=1.0.0
Requires (Dev)
- orchestra/testbench: 3.5.*
- phpunit/phpunit: ~6.0
README
安装
首先,我们需要安装 laravel-dompdf 库(https://github.com/barryvdh/laravel-dompdf)
composer require barryvdh/laravel-dompdf
在更新 composer 后,我们继续进行配置
将 ServiceProvider 添加到 config/app.php 中的 provides 数组中
Barryvdh\DomPDF\ServiceProvider::class,
然后,使用外观来缩短代码。将其添加到您的外观中
'PDF' => Barryvdh\DomPDF\Facade::class
在安装和配置 laravel-dompdf 之后,我们继续安装 iquote 模块
composer require imagina/iquote
重要:必须具有 storage/ 基础文件夹的读/写权限(755)
可选:如果报价 PDF 文件无法成功加载,我们必须在 storage/ 基础文件夹中创建 fonts/ 子文件夹
端点
路由基础:https://yourhost/api/iquote/v1/
-
包
-
属性
-
创建。
-
方法:
POST
-
需要认证:☑
-
路由
/packages
-
Post 参数(示例)
{ attributes:{ name: 'name', description: 'description' } }
-
-
读取
-
方法:
GET
-
需要认证:☐
-
路由
/packages
/packages/id
-
过滤器
-
包含
-
-
更新
- 方法:
PUT
- 需要认证:☑
- 路由
/packages/id
- 方法:
-
删除
- 方法:
DELETE
- 需要认证:☑
- 路由
/packages/id
- 方法:
-
-
产品
-
属性
-
创建。
-
方法:
POST
-
需要认证:☑
-
路由
/products
-
Post 参数(示例)
{ attributes:{ name: 'name', description: 'description', active: true, price: 15000 } }
-
-
读取
-
方法:
GET
-
需要认证:☐
-
路由
/products
/products/id
-
过滤器
-
包含
-
-
更新
- 方法:
PUT
- 需要认证:☑
- 路由
/products/id
- 方法:
-
删除
- 方法:
DELETE
- 需要认证:☑
- 路由
/products/id
- 方法:
-
-
特性
-
属性
-
创建
-
方法:
POST
-
需要认证:☑
-
路由
/characteristics
-
Post 参数(示例)
{ attributes:{ name: 'name', description: 'description', options: 'options', product_id: 1, type: 1, parent_id: 1, price: 1500, active: true, position: 1, required: true } }
-
-
读取
-
方法:
GET
-
需要认证:☐
-
路由
/characteristics
/characteristics/id
-
过滤器
-
包含
-
-
更新
- 方法:
PUT
- 需要认证:☑
- 路由
/characteristics/id
- 方法:
-
删除
- 方法:
DELETE
- 需要认证:☑
- 路由
/characteristics/id
- 方法:
-
-
类型(静态实体)
-
属性
-
读取
- 方法:
GET
- 需要认证:☐
- 路由
/types
- 方法:
-
-
报价
-
属性
-
创建
-
方法:
POST
-
需要认证:☑
-
路由
/quotes
-
Post 参数(示例)
{ attributes:{ first_name: 'first_name', last_name: 'last_name', email: 'email', phone: 'phone', notes: 'notes', value: 'value', user_id: 1, customer_id: 1 } }
-
-
读取
-
方法:
GET
-
需要认证:☐
-
路由
/quotes
/quotes/id
-
过滤器
-
包含
-
-
更新
- 方法:
PUT
- 需要认证:☑
- 路由
/characteristics/id
- 方法:
-
删除
- 方法:
DELETE
- 需要认证:☑
- 路由
/quotes/id
- 方法:
-