2017 © Pedro PelĂĄez
 

library filepreviews-laravel

Laravel 5 service provider for FilePreviews.io

image

filepreviews/filepreviews-laravel

Laravel 5 service provider for FilePreviews.io

  • Saturday, November 28, 2015
  • by jpadilla
  • Repository
  • 2 Watchers
  • 4 Stars
  • 3,037 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

filepreviews-laravel

Laravel 5 service provider for FilePreviews.io, (*1)

Installation

$ composer require filepreviews/filepreviews-laravel

To use the FilePreviews Service Provider, you must register the provider when bootstrapping your Laravel application., (*2)

Find the providers key in your config/app.php and register the FilePreviews Service Provider., (*3)

    'providers' => [
        // ...

        FilePreviews\Laravel\FilePreviewsServiceProvider::class,
    ]

Find the aliases key in your config/app.php and add the FilePreviews facade alias., (*4)

    'aliases' => [
        // ...

        'FilePreviews' => FilePreviews\Laravel\FilePreviewsFacade::class,
    ]

To customize the configuration file, publish the package configuration using Artisan., (*5)

$ php artisan vendor:publish

Update your settings in the generated config/filepreviews.php configuration file., (*6)

<?php

return [
    'api_key' => env('FILEPREVIEWS_API_KEY', ''),
    'api_secret' => env('FILEPREVIEWS_API_SECRET', '')
];

Usage

In order to use the FilePreviews PHP client library within your app, you need to resolve it from the Laravel Service Container., (*7)

$fp = app('FilePreviews');
$fp->generate($url, $options);

Handling Webhooks

Point a route to the controller., (*8)

Route::post('filepreviews/webhook', '\FilePreviews\Laravel\WebhookController@handleWebhook');

Since FilePreviews webhooks need to bypass Laravel's CSRF verification, be sure to list the URI as an exception in your VerifyCsrfToken middleware:, (*9)

protected $except = [
    'filepreviews/webhook',
];

The Versions

28/11 2015

dev-master

9999999-dev http://filepreviews.io

Laravel 5 service provider for FilePreviews.io

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel file thumbnails metadata exif ocr previews filepreviews

28/11 2015

v1.0.0

1.0.0.0 http://filepreviews.io

Laravel 5 service provider for FilePreviews.io

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel file thumbnails metadata exif ocr previews filepreviews