How to get image from resources in Laravel?

后端 未结 3 2082
醉话见心
醉话见心 2021-02-19 04:36

I upload all user files to directory:

/resources/app/uploads/

I try to get image by full path:

http://localhost/resources/app/u         


        
3条回答
  •  独厮守ぢ
    2021-02-19 05:27

    Try {{asset('path/to/your/image.jpg')}} if you want to call it from your blade

    or

    $url = asset('path/to/your/image.jpg'); if you want it in your controller.

    Hope it helps =)

提交回复
热议问题