imagina/iquote-module

安装: 1

依赖项: 0

建议者: 0

安全: 0

星星: 0

观察者: 6

分支: 0

开放问题: 0

类型:asgard-module

1.0.10 2020-05-18 20:15 UTC

This package is auto-updated.

Last update: 2024-09-11 08:25:31 UTC


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