2017 © Pedro Peláez
 

library laravel-viddler-upload

image

leadthread/laravel-viddler-upload

  • Thursday, February 22, 2018
  • by tylercd100
  • Repository
  • 2 Watchers
  • 1 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 40 Versions
  • 3 % Grown

The README.md

Laravel Viddler Upload

Latest Version Software License Build Status Scrutinizer Code Quality Code Coverage Dependency Status Total Downloads, (*1)

This package makes uploading videos to Viddler easier, (*2)

Installation

Install via composer - In the terminal:, (*3)

composer require leadthread/laravel-viddler-upload

Now add the following to the providers array in your config/app.php, (*4)

LeadThread\Viddler\Upload\Providers\Viddler::class

and this to the aliases array in config/app.php, (*5)

"Viddler" => LeadThread\Viddler\Upload\Facades\Viddler::class,

Then you will need to run these commands in the terminal in order to copy the config file, (*6)

php artisan vendor:publish --provider="LeadThread\Viddler\Upload\Providers\Viddler"

This package includes a migration file. Before you run the migration you may want to take a look at config/viddler.php and change the table property to a table name that you would like to use. After that run the migration, (*7)

php artisan migrate

Usage

function upload(Request $request)
{
    $file = $request->file('file');
    $name = "My Video Title";

    /*
     * Returns an Eloquent Model
     */
    $model = Viddler::create($file, $name);

    // Convert the file
    $model->convert();

    // Upload it
    $model->upload();

    // Check the encoding status
    $model->check();

    return $model;
}

Contributing

Contributions are always welcome!, (*8)

The Versions