PHP code example of codex-team / capella

1. Go to this page and download the library: Download codex-team/capella library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codex-team / capella example snippets


use \Capella\Capella;

$image = Capella::upload('path-or-url-to-your-picture');

$url = $image->url();

use \Capella\Capella;

$image = Capella::image('abcdef-1234-abcd-1234');

use \Capella\Capella;

$image = Capella::upload('picture.jpg');

$url = $image->resize(100)->url();
echo $url; // https://capella.pics/<id>/resize/100
  
$url = $image->crop(100, 200);
echo $url; // https://capella.pics/<id>/crop/100x200

php >= 5.6
php-curl