form代码:
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
<input type="file" id="file" name="source"/>
<button type="submit">上传</button>
</form>
$file = $request->file('source');可以成功获取到文件,但是下一步的$file->isValid()一直为false???
怕是上传失败了,检查PHP临时目录的权限~