Download the PHP package lingwave/cloudconvert-laravel without Composer
On this page you can find all versions of the php package lingwave/cloudconvert-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lingwave/cloudconvert-laravel
More information about lingwave/cloudconvert-laravel
Files in lingwave/cloudconvert-laravel
Package cloudconvert-laravel
Short Description A Laravel wrapper for the CloudConvert API
License MIT
Informations about the package cloudconvert-laravel
CloudConvert Laravel API
A Laravel wrapper for the CloudConvert API. See https://cloudconvert.com for more details.
Installation
Install this package through Composer.
Add this to your composer.json
dependencies:
Using Laravel 8.0+
Using Laravel 7.0+
For older versions of laravel see https://github.com/robbiepaul/cloudconvert-laravel
Run composer install
to download the required files.
Next you need to add the service provider to config/app.php
One more step.
You need to publish the config php artisan vendor:publish
Just enter your API key in config/cloudconvert.php
You can get your free API key by registering at https://cloudconvert.com
Now you can use CloudConvert in your application!
Usage
There's many ways to use CloudConvert. I'll cover a few of them here, for all the converter options I suggest checking out the API docs.
File conversion
Dynamic file conversion
Converter options
There are many more conversion options. I've put shortcuts like the ones above for the most common. However you can pass through any options you like using the withOptions
method, such as:
Chaining multiple conversions
You can also chain multiple conversions on one process, like this:
Remote files
It will also work with converting remote files (just make sure you provide a path to save it to)
Merging PDFs
At the moment, merging only works with remotely hosted files, however in the future it will work with uploaded files and files from storage
Website screenshot
CloudConvert will also take a screenshot of a website and convert it to an image or pdf for you:
Converting to and from external storage options
At the moment CloudConvert let you use FTP or Amazon S3 as storage options. However it looks like in the future they will add Google Drive and Dropbox to the API
Please note: To use these storage options you will need to provide the configuration in the
config/cloudconvert.php
It's that simple. The storage options CloudConvert::S3($path)
and CloudConvert::FTP($path)
can be used for both input files and output files.
Non-blocking conversion using a callback URL
When the conversion might take a long time you could use:
Non-blocking conversion using a queue
To use queues you will need have set-up either beanstalk or iron in your config/queue.php
Conversion types
You can view the conversion types using the conversionTypes()
method. It always returns Illuminate\Support\Collection
.
Processes status
You may want to list all your processes, running, finished and failed. It always returns a Illuminate\Support\Collection
.
Artisan commands
If you want to do quick conversions or calls to the API from your console, you can use the following commands:
Convert a file
Website screenshot
Processes list
Conversion types
Using this package without Laravel
You still need to use composer. Type composer require robbiep/cloudconvert-laravel
to download the files, then you can use the package like this:
Todo
- [x] Release
- [ ] Write some more tests
- [x] Enable merging of multiple files
- [x] Enable multiple conversions using one process
- [ ] Refactor the commands
- [x] Added support for Guzzle ~6.0
- [ ] Readme file is getting long, convert to wiki
Contributing
- Fork it
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Credits
Thanks to Lunaweb Ltd. for their API. Go check it out.
Resources
All versions of cloudconvert-laravel with dependencies
illuminate/support Version ^8.0
illuminate/filesystem Version ^8.0
guzzlehttp/guzzle Version ~7.0
patchwork/utf8 Version 1.*