Reputation: 14978
I have created an upload
folder at the same level of app
and storing uploaded files there. Now I need to access those file via browser so need to have an http://
based address.
First, am I doing right? What are Laravel 5.1's recommendation? Where should files be stored? If no recommendation then how do I get ULRs?
Upvotes: 0
Views: 2882
Reputation: 21437
Store the files within your public folder
create uploads folder
and then you can simply access from there using asset()
function like as
asset("uploads/your_file")
Upvotes: 2
Reputation: 26
You can use Request::root()
to get the root URL of your website and then simply use Request::root()."/uploads/your_file"
Upvotes: 0