Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created December 15, 2019 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/d959ce84c3b4e027f34c2c7bc117cfcf to your computer and use it in GitHub Desktop.
Save uno-de-piera/d959ce84c3b4e027f34c2c7bc117cfcf to your computer and use it in GitHub Desktop.
<?php
Route::get('/uploader', function () {
return view('multi-uploader');
});
Route::post('/upload', function () {
if ( request()->has( 'files' ) ) {
foreach (request('files') as $file) {
$file->storeAs('files', $file->getClientOriginalName());
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment