vovanmix / laravel-video-api
There is no license information available for the latest version (dev-master) of this package.
Fork of sseffa/laravel-video-api v 1.0 for Laravel 4 with fixed Vimeo links
dev-master
2015-06-12 21:39 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.*
This package is not auto-updated.
Last update: 2024-11-13 10:16:30 UTC
README
Installation
1. Install with Composer
composer require "Vovanmix/video-api": "dev-master"
2. Add to app/config/app.php
'providers' => array( // ... 'Vovanmix\VideoApi\VideoApiServiceProvider', ),
And:
'aliases' => array( // ... 'VideoApi' => 'Vovanmix\VideoApi\Facades\VideoApi', ),
Usage
<?php Route::get('video/youtube/{id}', function ($id) { //$data = VideoApi::setType('youtube')->getVideoDetail($id); // video detail $data = VideoApi::setType('youtube')->getVideoList($id); // video list var_dump($data); }); Route::get('video/vimeo/{id}', function ($id) { //$data = VideoApi::setType('vimeo')->getVideoDetail($id); $data = VideoApi::setType('vimeo')->getVideoList($id); var_dump($data); });