-
-
Save uno-de-piera/d959ce84c3b4e027f34c2c7bc117cfcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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