2017 © Pedro Peláez
 

library cloudder

Cloudinary API wrapper for Laravel

image

jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  • Tuesday, May 8, 2018
  • by jrm2k6
  • Repository
  • 7 Watchers
  • 148 Stars
  • 95,077 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 30 Forks
  • 4 Open issues
  • 24 Versions
  • 13 % Grown

The README.md

Cloudder - Cloudinary wrapper for Laravel 5 / Lumen

This project is not actively maintained. I might be slow to answer, as you can tell by looking at the issues. I have moved to some new projects, not in the PHP ecosystem. You can always reach out to me through my email.

If you fork it on publish it as your own, it might be nice to credit the original author at https://github.com/teepluss/laravel4-cloudinary.

Build Status License Latest Version Total Downloads, (*1)

Initially forked from https://github.com/teepluss/laravel4-cloudinary., (*2)

If there is any feature you would like feel free to open an issue or send me an email!, (*3)

Installation

composer require jrm2k6/cloudder, (*4)

For people still using Laravel 4.2: composer require jrm2k6/cloudder:0.1.* and check the branch l4 for the installation instructions., (*5)

Configuration

Modify your .env file to add the following information from Cloudinary, (*6)

Required

CLOUDINARY_API_KEY=012345679890123
CLOUDINARY_API_SECRET=foobarfoobarfoob-arfoobarfo
CLOUDINARY_CLOUD_NAME=foobarcorp

Optional

CLOUDINARY_BASE_URL
CLOUDINARY_SECURE_URL
CLOUDINARY_API_BASE_URL

Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. If you don't use auto-discovery follow the next steps:, (*7)

Add the following in config/app.php:, (*8)

'providers' => array(
  JD\Cloudder\CloudderServiceProvider::class,
);

'aliases' => array(
  'Cloudder' => JD\Cloudder\Facades\Cloudder::class,
);

Run php artisan vendor:publish --provider="JD\Cloudder\CloudderServiceProvider", (*9)

Usage

upload()

Cloudder::upload($filename, $publicId, array $options, array $tags);

with:, (*10)

  • $filename: path to the image you want to upload
  • $publicId: the id you want your picture to have on Cloudinary, leave it null to have Cloudinary generate a random id.
  • $options: options for your uploaded image, check the Cloudinary documentation to know more
  • $tags: tags for your image

returns the CloudinaryWrapper., (*11)

uploadVideo()

Cloudder::uploadVideo($filename, $publicId, array $options, array $tags);

with:, (*12)

  • $filename: path to the video you want to upload
  • $publicId: the id you want your video to have on Cloudinary, leave it null to have Cloudinary generate a random id.
  • $options: options for your uploaded video, check the Cloudinary documentation to know more
  • $tags: tags for your image

returns the CloudinaryWrapper., (*13)

getPublicId()

Cloudder::getPublicId()

returns the public id of the last uploaded resource., (*14)

getResult()

Cloudder::getResult()

returns the result of the last uploaded resource., (*15)

show() + secureShow()

Cloudder::show($publicId, array $options)
Cloudder::secureShow($publicId, array $options)

with:, (*16)

  • $publicId: public id of the resource to display
  • $options: options for your uploaded resource, check the Cloudinary documentation to know more

returns the url of the picture on Cloudinary (https url if secureShow is used)., (*17)

showPrivateUrl()

Cloudder::showPrivateUrl($publicId, $format, array $options)

with:, (*18)

  • $publicId: public id of the resource to display
  • $format: format of the resource your want to display ('png', 'jpg'...)
  • $options: options for your uploaded resource, check the Cloudinary documentation to know more

returns the private url of the picture on Cloudinary, expiring by default after an hour., (*19)

rename()

Cloudder::rename($publicId, $toPublicId, array $options)

with:, (*20)

  • $publicId: publicId of the resource to rename
  • $toPublicId: new public id of the resource
  • $options: options for your uploaded resource, check the cloudinary documentation to know more

renames the original picture with the $toPublicId id parameter., (*21)

destroyImage() + delete()

Cloudder::destroyImage($publicId, array $options)
Cloudder::delete($publicId, array $options)

with:, (*22)

  • $publicId: publicId of the resource to remove
  • $options: options for the image to delete, check the cloudinary documentation to know more

removes image from Cloudinary., (*23)

destroyImages()

Cloudder::destroyImages(array $publicIds, array $options)

with:, (*24)

  • $publicIds: array of ids, identifying the pictures to remove
  • $options: options for the images to delete, check the cloudinary documentation to know more

removes images from Cloudinary., (*25)

addTag()

Cloudder::addTag($tag, $publicIds, array $options)

with:, (*26)

  • $tag: tag to apply
  • $publicIds: images to apply tag to
  • $options: options for your uploaded resource, check the cloudinary documentation to know more

removeTag()

Cloudder::removeTag($tag, $publicIds, array $options)

with:, (*27)

  • $tag: tag to remove
  • $publicIds: images to remove tag from
  • $options: options for your uploaded image, check the Cloudinary documentation to know more

createArchive()

Cloudder::createArchive(array $options, $archiveName, $mode)

with:, (*28)

  • $options: options for your archive, like name, tag/prefix/public ids to select images
  • $archiveName: name you want to give to your archive
  • $mode: 'create' or 'download' ('create' will create an archive and returns a JSON response with the properties of the archive, 'download' will return the zip file for download)

creates a zip file on Cloudinary., (*29)

downloadArchiveUrl()

Cloudder::downloadArchiveUrl(array $options, $archiveName)

with:, (*30)

  • $options: options for your archive, like name, tag/prefix/public ids to select images
  • $archiveName: name you want to give to your archive

returns a download url for the newly created archive on Cloudinary., (*31)

Running tests

phpunit, (*32)

Example

You can find a working example in the repo cloudder-l5-example, (*33)

The Versions

08/05 2018

dev-master

9999999-dev https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

08/05 2018

0.5.2

0.5.2.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

08/05 2018

0.6.0

0.6.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

27/04 2018

0.5.1

0.5.1.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

08/04 2018

0.5.0

0.5.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

03/02 2017

0.4.0

0.4.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

01/02 2017

dev-laravel-lumen-5.4

dev-laravel-lumen-5.4 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

09/10 2016

dev-refactoring

dev-refactoring https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

05/10 2016

0.3.1

0.3.1.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

05/09 2016

0.3.0

0.3.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

25/05 2016

0.2.3

0.2.3.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

29/11 2015

0.2.2

0.2.2.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

21/11 2015

0.2.1

0.2.1.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

23/06 2015

dev-l4

dev-l4 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

23/06 2015

0.2.0

0.2.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

31/05 2015

0.1.8

0.1.8.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

31/05 2015

0.1.7

0.1.7.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

31/05 2015

0.1.6

0.1.6.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

31/05 2015

0.1.5

0.1.5.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

13/04 2015

0.1.4

0.1.4.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

13/04 2015

0.1.3

0.1.3.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

13/04 2015

0.1.2

0.1.2.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

08/04 2015

0.1.1

0.1.1.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary

06/04 2015

0.1.0

0.1.0.0 https://github.com/jrm2k6/cloudder

Cloudinary API wrapper for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Dagorn

laravel api upload image laravel4 cloudinary