Missing includes. Fix by using the request object instead of facade.

This commit is contained in:
Daniel Meltzer 2020-05-23 11:36:16 -04:00
parent 3db4480bba
commit c70bd62a0f
No known key found for this signature in database
GPG key ID: 91C5C7B09A5B1CA0

View file

@ -34,12 +34,12 @@ class LicenseFilesController extends Controller
if (isset($license->id)) {
$this->authorize('update', $license);
if (Request::hasFile('file')) {
if ($request->hasFile('file')) {
if (!Storage::exists('private_uploads/licenses')) Storage::makeDirectory('private_uploads/licenses', 775);
$upload_success = false;
foreach (Input::file('file') as $file) {
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'license-'.$license->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;