imagina / iquote-module
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:asgard-module
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
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
- Method:
-
Delete
- Method:
DELETE
- Requires Authentication: ☑
- Routes:
/packages/id
- Method:
-
-
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
- Method:
-
Delete
- Method:
DELETE
- Requires Authentication: ☑
- Routes:
/products/id
- Method:
-
-
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
- Method:
-
Delete
- Method:
DELETE
- Requires Authentication: ☑
- Routes:
/characteristics/id
- Method:
-
-
Types (Static Entity)
-
Attributes
-
Read:
- Method:
GET
- Requires Authentication: ☐
- Routes:
/types
- Method:
-
-
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
- Method:
-
Delete
- Method:
DELETE
- Requires Authentication: ☑
- Routes:
/quotes/id
- Method:
-