PHP code example of vientodigital / vimeo-laravel

1. Go to this page and download the library: Download vientodigital/vimeo-laravel 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/ */

    

vientodigital / vimeo-laravel example snippets


// Fetching data.
$vimeo->request('/users/dashron', ['per_page' => 2], 'GET');

// Upload videos.
$vimeo->upload('/home/aaron/foo.mp4');

// Want to use a facade?
Vimeo::uploadImage('/videos/123/images', '/home/aaron/bar.png', true);

Vimeo\Laravel\VimeoServiceProvider::class

'Vimeo' => Vimeo\Laravel\Facades\Vimeo::class

VIMEO_CLIENT=
VIMEO_SECRET=
VIMEO_ACCESS=

VIMEO_ALT_CLIENT=
VIMEO_ALT_SECRET=
VIMEO_ALT_ACCESS=

// You can alias this in config/app.php.
use Vimeo\Laravel\Facades\Vimeo;

Vimeo::request('/me/videos', ['per_page' => 10], 'GET');
// We're done here - how easy was that, it just works!

Vimeo::upload('/bar.mp4');
// This example is simple and there are far more methods available.

use Vimeo\Laravel\Facades\Vimeo;

// Writing this…
Vimeo::connection('main')->upload('/bar.mp4');

// …is identical to writing this
Vimeo::upload('/bar.mp4');

// and is also identical to writing this.
Vimeo::connection()->upload('/bar.mp4');

// This is because the main connection is configured to be the default.
Vimeo::getDefaultConnection(); // This will return main.

// We can change the default connection.
Vimeo::setDefaultConnection('alternative'); // The default is now alternative.

use Vimeo\Laravel\VimeoManager;

class Foo
{
    protected $vimeo;

    public function __construct(VimeoManager $vimeo)
    {
        $this->vimeo = $vimeo;
    }

    public function bar()
    {
        $this->vimeo->upload('/foo.mp4');
    }
}

App::make('Foo')->bar();
bash
$ php artisan vendor:publish --provider="Vimeo\Laravel\VimeoServiceProvider"