imagina/iquote-module

1.0.10 2020-05-18 20:15 UTC

This package is auto-updated.

Last update: 2024-11-11 08:52:51 UTC


README

Installation

First, we require the installation of laravel-dompdf library (https://github.com/barryvdh/laravel-dompdf):

composer require barryvdh/laravel-dompdf

After updating composer, we proceed to configure it:

Add the ServiceProvider to the provides array in config/app.php

Barryvdh\DomPDF\ServiceProvider::class,

Then, use the facade for shorter code. Add this to your facades:

'PDF' => Barryvdh\DomPDF\Facade::class

After install and config laravel-dompdf we proceed to install iquote module:

composer require imagina/iquote

Important: the storage/ base folder must be read/write permissions (755)

Optional: If the quote pdf file does not load successfully, we must create in the storage/ base folder the fonts/ subfolder

End Points

Route Base: https://yourhost/api/iquote/v1/

  • Packages

    • Attributes

    • Create.

      • Method: POST

      • Requires Authentication: ☑

      • Routes:

        • /packages
      • Post params (Example):

        {
           attributes:{
             name: 'name',
             description: 'description'
           }
        }
        
    • Read

      • Method: GET

      • Requires Authentication: ☐

      • Routes:

        • /packages
        • /packages/id
      • Filters

      • Includes

    • Update

      • Method: PUT
      • Requires Authentication: ☑
      • Routes:
        • /packages/id
    • Delete

      • Method: DELETE
      • Requires Authentication: ☑
      • Routes:
        • /packages/id
  • Products

    • Attributes

    • Create.

      • Method: POST

      • Requires Authentication: ☑

      • Routes:

        • /products
      • Post params (Example):

        {
           attributes:{
             name: 'name',
             description: 'description',
             active: true,
             price: 15000
           }
        }
        
    • Read

      • Method: GET

      • Requires Authentication: ☐

      • Routes:

        • /products
        • /products/id
      • Filters

      • Includes

    • Update

      • Method: PUT
      • Requires Authentication: ☑
      • Routes:
        • /products/id
    • Delete

      • Method: DELETE
      • Requires Authentication: ☑
      • Routes:
        • /products/id
  • Characteristics

    • Attributes

    • Create:

      • Method: POST

      • Requires Authentication: ☑

      • Routes:

        • /characteristics
      • Post params (Example):

        {
           attributes:{
               name: 'name',
               description: 'description',
               options: 'options',
               product_id: 1,
               type: 1,
               parent_id: 1,
               price: 1500,
               active: true,
               position: 1,
               required: true
           }
        }
        
    • Read:

      • Method: GET

      • Requires Authentication: ☐

      • Routes:

        • /characteristics
        • /characteristics/id
      • Filters

      • Includes

    • Update

      • Method: PUT
      • Requires Authentication: ☑
      • Routes:
        • /characteristics/id
    • Delete

      • Method: DELETE
      • Requires Authentication: ☑
      • Routes:
        • /characteristics/id
  • Types (Static Entity)

    • Attributes

    • Read:

      • Method: GET
      • Requires Authentication: ☐
      • Routes:
        • /types
  • Quotes

    • Attributes

    • Create:

      • Method: POST

      • Requires Authentication: ☑

      • Routes:

        • /quotes
      • Post params (Example):

        {
           attributes:{
              first_name: 'first_name',
              last_name: 'last_name',
              email: 'email',
              phone: 'phone',
              notes: 'notes',
              value: 'value',
              user_id: 1,
              customer_id: 1
           }
        }
        
    • Read:

      • Method: GET

      • Requires Authentication: ☐

      • Routes:

        • /quotes
        • /quotes/id
      • Filters

      • Includes

    • Update

      • Method: PUT
      • Requires Authentication: ☑
      • Routes:
        • /characteristics/id
    • Delete

      • Method: DELETE
      • Requires Authentication: ☑
      • Routes:
        • /quotes/id