PHP code example of libressltd / lbmediacenter

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

    

libressltd / lbmediacenter example snippets



LIBRESSLtd\LBMediaCenter\LBMediaCenterServiceProvider::class,



php artisan vendor:publish --tag=lbmediacenter --force
php artisan migrate
php artisan storage:link


// Save an uploaded file
if ($request->hasFile("file"))
{
	$media = Media::saveFile($request->file);
}

// Download file from internet

$media = Media::download_file($url);

// get image link
// $style = "scale_to_fill" or "scale_to_fit"

$media->link($width, $height, $style);

// get file path
$media->path();