Download the PHP package cloudconvert/cloudconvert-laravel without Composer
On this page you can find all versions of the php package cloudconvert/cloudconvert-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cloudconvert/cloudconvert-laravel
More information about cloudconvert/cloudconvert-laravel
Files in cloudconvert/cloudconvert-laravel
Package cloudconvert-laravel
Short Description Laravel PHP SDK for CloudConvert APIs
License MIT
Homepage https://github.com/cloudconvert/cloudconvert-php
Informations about the package cloudconvert-laravel
cloudconvert-laravel
This is the official Laravel package for the CloudConvert API v2. This package depends on the PHP SDK v3.
Installation
You can install the package alongside Guzzle via composer:
composer require cloudconvert/cloudconvert-laravel guzzlehttp/guzzle
This package is not tied to any specific HTTP client by using PSR-7, PSR-17, PSR-18, and HTTPlug. Therefore, you will also need to install packages that provide psr/http-client-implementation
and psr/http-factory-implementation
(for example Guzzle).
Next you must publish the config file.
php artisan vendor:publish --provider="CloudConvert\Laravel\Providers\CloudConvertServiceProvider"
This is the content that will be published to config/cloudconvert.php
:
Usage
Once configured you can call all the PHP SDK methods on the CloudConvert
facade.
Please check the PHP SDK repository for the full documentation.
Uploading Files
Uploads to CloudConvert are done via import/upload
tasks (see the docs). This SDK offers a convenient upload method:
Downloading Files
CloudConvert can generate public URLs for using export/url
tasks. You can use the PHP SDK to download the output files when the Job is finished.
Webhooks
This package can help you handle the CloudConvert webhooks. Out of the box it will verify the CloudConvert signature of all incoming requests. You can easily define event subscribers when specific events hit your app.
Route
You can create your webhook in the webhook settings and point it to something like https://your.app/webhook/cloudconvert
. Make sure to to configure the shown signing secret in the config file of this package.
In the routes file of your app you must pass that route to a controller provided by this package.
Because CSRF token validation is not availble for this route, you must also add that route to the except array of the VerifyCsrfToken
middleware:
Events
Whenever a webhook event hits your app, the package fires a cloudconvert-webhooks::<event-name>
event (for example cloudconvert-webhooks::job.finished
).
The payload of the event will be a WebhookEvent
from the PHP SDK. An event subscriber in your app could look like this:
Register the subscriber in the EventServiceProvider
Tests
vendor/bin/phpunit
Resources
All versions of cloudconvert-laravel with dependencies
illuminate/container Version ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 || ^11.0
illuminate/support Version ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 || ^11.0
illuminate/http Version ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 || ^11.0
illuminate/routing Version ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 || ^11.0
cloudconvert/cloudconvert-php Version ^3.1.0
symfony/psr-http-message-bridge Version ^1.2|^2.0 || ^7.0
nyholm/psr7 Version ^1.2