vovanmix / laravel-video-api by vovanmix

Fork of sseffa/laravel-video-api v 1.0 for Laravel 4 with fixed Vimeo links
6
1
3
Package Data
Maintainer Username: vovanmix
Package Create Date: 2015-06-12
Package Last Update: 2015-06-12
Home Page:
Language: PHP
License: Unknown
Last Refreshed: 2024-11-19 03:22:43
Package Statistics
Total Downloads: 6
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Laravel Video API

Latest Stable Version Total Downloads Coverage Status

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);
});

Licence

MIT license