PHP code example of joggapp / laravel-mux

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

    

joggapp / laravel-mux example snippets


return [
    'access_token' => env('MUX_ACCESS_TOKEN'),

    'secret_key' => env('MUX_SECRET_KEY'),

    'api_url' => env('MUX_API_URL', 'https://api.mux.com/video/v1'),

    'webhook_processing_queue' => env('MUX_WEBHOOK_PROCESSING_QUEUE', 'encoding'),

    'webhook_secret' => env('MUX_WEBHOOK_SECRET')
];

Route::muxWebhook('route-you-prefer')->middleware('validate.mux.signature');

Mux::encode(Media $media, array $options = []): Response

Mux::addCaptionsToVideo(Media $media, array $options = []): Response

Mux::getAssetDetails(string $assetId): Response
bash
php artisan vendor:publish --provider="JoggApp\Mux\MuxServiceProvider"