Download the PHP package nmirceac/api-client-tools without Composer
On this page you can find all versions of the php package nmirceac/api-client-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nmirceac/api-client-tools
More information about nmirceac/api-client-tools
Files in nmirceac/api-client-tools
Package api-client-tools
Short Description API Client Tools for Laravel
License proprietary
Homepage https://github.com/nmirceac/apiClientTools
Informations about the package api-client-tools
apiClientTools
API Client Tools
Contents
- Intro
- Examples
1. Intro
How to install?
- composer require nmirceac/api-client-tools
- php artisan vendor:publish
- check config/api-client.php (just in case)
- add your API details to .env
- php artisan apitools:publish - to generate the models
- check the examples below
- enjoy!
Samples
.env sample config
2. Examples
ColorTools images support
Objects are scanned for \ColorTools\ImageStore objects that are hydrated to a \ApiClientTools\App\ApiImageStore object
All the objects have a url
property to their full size URL
The objects will have modifying and publishing methods similar to a \ColorTools\ImageStore object
You can apply modifiers and then publish
The modifier is only a mutator that returns the object
The publishing format can be overridden
You can also modify and publish in one go
And do that while specifying the publishing format
Thumbnails support
Non image thumbnails are also supported through a similar syntax. Just make sure you remove the typehint as the passed object to the close might not be an image.
or
Just note that only the fit
method is supported at the moment - all the other methods are gracefully ignored
File payload helper methods
Now you can easy attach FileTools compatible file payloads with two helper methods