How to get file URL using Storage facade in laravel 5?

前端 未结 13 809
庸人自扰
庸人自扰 2020-11-30 22:40

I\'ve been experimenting using the new Flysystem integration with Laravel 5. I am storing \'localised\' paths to the DB, and getting the Storage facade to complete the path

13条回答
  •  我在风中等你
    2020-11-30 23:33

    this work for me in 2020 at laravel 7

            $image_resize = Image::make($image->getRealPath());
            $image_resize->resize(800,600);
            $image_resize->save(Storage::disk('episodes')->path('') . $imgname);
    

    so you can use it like this

    echo Storage::disk('public')->path('');
    

提交回复
热议问题