PHP code example of kapitannwel / laravelfileupload
1. Go to this page and download the library: Download kapitannwel/laravelfileupload 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/ */
kapitannwel / laravelfileupload example snippets
use kapitannwel\LaravelFileUpload\LaravelFileUpload;
$file = $request->file('element');
LaravelFileUpload::generateUniqueFileName($file->getClientOriginalName(), 'folder_name');
LaravelFileUpload::deleteFile($filename, 'folder_name');
LaravelFileUpload::saveFile('folder_name', $file, $filename);