PHP code example of filepreviews / filepreviews-laravel

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

    

filepreviews / filepreviews-laravel example snippets


    'providers' => [
        // ...
        
        FilePreviews\Laravel\FilePreviewsServiceProvider::class,
    ]

    'aliases' => [
        // ...
        
        'FilePreviews' => FilePreviews\Laravel\FilePreviewsFacade::class,
    ]



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

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

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

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

$ php artisan vendor:publish