当我尝试上传文件时,出现错误:
未定义变量: 请求
这是我使用它的地方: UploadController:
未定义变量: 请求
这是我使用它的地方: UploadController:
if($request->hasFile('file')){
$file = $request ->file('file');
$fileName = $file->getClientOriginalName();
$destinationPath = config('app.fileDesinationPath').'/'.$fileName;
$uploads = Storage::put($destinationPath,file_get_contents($file->getRealPath()));
}
return redirect()->to('/upload');
这里出了什么问题?