PHP code example of mkn / laravel-file-uploader
1. Go to this page and download the library: Download mkn/laravel-file-uploader 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/ */
mkn / laravel-file-uploader example snippets
composer san migrate --path=vendor/mkn/laravel-file-uploader/src/database/migrations
php artisan vendor:publish --provider="mkn\LaravelFileUploader\FileUploaderServiceProvider"
use App/FileUpload;
$file = FileUpload::single($request->paramenter, $directory); //for single upload return an id
$file = FileUpload::multiple($request->paramenters, $directory); //for multiple upload return array with ids
$file = FilUpload::findOrFail(1);
$file->deleteFile(); //to delete file
$file->showFile(); //to show file
$file->downloadFile(); //to download file