PHP code example of ghostcompiler / laravel-uploads
1. Go to this page and download the library: Download ghostcompiler/laravel-uploads 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/ */
ghostcompiler / laravel-uploads example snippets
use GhostCompiler\LaravelUploads\Facades\Uploads;
// Store a file under configured defaults
$upload = Uploads::upload($request->file('avatar'));
// Store to a specific directory inside the storage path
$upload = Uploads::upload('avatars', $request->file('avatar'));