1. Go to this page and download the library: Download m2code/file-manager 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/ */
m2code / file-manager example snippets
use M2code\FileManager\Facades\FileManager;
$path = FileManager::save($request->file('image'), 'uploads');
use M2code\FileManager\Uploaders\ImageUploader;
$uploader = new ImageUploader();
$result = $uploader
->enableBlur()
->enableLowQuality()
->upload($request->file('photo'), 'uploads/images');
$result->path; // Original file path
$result->lowQualityPath; // Low quality version
$result->blurhash; // Blurhash string
use M2code\FileManager\Facades\FileUrl;
$url = FileUrl::url('uploads/images/image.jpg'); // Local or driver-specific