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

前端 未结 13 814
庸人自扰
庸人自扰 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:25

    First get file url/link then path, as below:

    $url = Storage::disk('public')->url($filename);
    $path = public_path($url);
    

提交回复
热议问题