将图像保存在公用文件夹中,而不是存储 laravel 5
我想把我的头像保存在“公共”文件夹,然后检索。
还行。我可以保存它,但在“存储/应用程序”文件夹中,而不是“公共”
我的朋友告诉我去“配置/文件系统.php”并编辑它,所以我就这样做了
 'disks' => [
   'public' => [
        'driver' => 'local',
        'root' => storage_path('image'),
        'url' => env('APP_URL').'/public',
        'visibility' => 'public',
    ],
仍然没有变化。
这是我的简单代码
路线:
Route::get('pic',function (){
return view('pic.pic');
});
Route::post('saved','test2Controller@save');
控制器
public function save(Request $request)
{
        $file = $request->file('image');
        //save format
        $format = $request->image->extension();
        //save full adress of image
        $patch = $request->image->store('images');
        $name = $file->getClientOriginalName();
        //save on table
        DB::table('pictbl')->insert([
            'orginal_name'=>$name,
            'format'=>$base,
            'patch'=>$patch
        ]);
        return response()
               ->view('pic.pic',compact("patch"));
}
视图:
{!! Form::open(['url'=>'saved','method'=>'post','files'=>true]) !!}
                {!! Form::file('image') !!}
                {!! Form::submit('save') !!}
            {!! Form::close() !!}
                <img src="storage/app/{{$patch}}">
如何将我的图像(和将来的文件)保存在公用文件夹而不是存储中?