PHP code example of modularavel / larabunny

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

    

modularavel / larabunny example snippets


'larabunny' => [
    'driver' => 'larabunny',
    'hostname' => env('MODULARAVEL_LARABUNNY_HOSTNAME'),
    'library_id' => env('MODULARAVEL_LARABUNNY_LIBRARY_ID'),
    'api_key' => env('MODULARAVEL_LARABUNNY_API_KEY'),
],

$videoId = Storage::disk('larabunny')->put('abc.mp4', file_get_contents('abc.mp4'));
// $videoId = guid from bunny.

 // Enable Direct File Access from Bunny to Access m3u8
return response(Storage::disk('larabunny')->get("$videoId/playlist.m3u8"));