首先,我很抱歉我的英语不好。上传文件/图像与类存储Laravel 5.2
我想上传一个文件/图像从我的驱动程序到我的项目目录使用类Storage
。我希望每个文件/图像都能上传/移动到我的public/img
目录中。我对我的看法和我的岗位控制器上使用Form::file('img')
,我写这篇文章
$img = Input::file('img');
if ($img !== null) {
$filename = $img->getClientOriginalName();
Storage::disk('uploads')->put('filename', $filename);
$jenis->img = $filename;
}
和我config/filesystem
我写这篇文章
'uploads' => [
'driver' => 'local',
'root' => public_path() . '/img',
],
但是,没有发生在我public/img
目录,没有新的文件/图像在那里。 你能帮我解决我的代码有什么问题吗? ,我希望你们可以帮助我如何上传laravel中的文件/图像
需要帮助[先生亚历克斯](http://stackoverflow.com/users/2781542/jacurtis) –