I am very new to Lumen.
I have path public/profile/pic.png
I want to generate url for this pic and save that url into databse.
I tried function url(public/profile/pic.png)
. Its creating as http://public/profile/pic.png
. Not the correct url.
I tried asset(public/profile/pic.png)
Error - Call to undefined function asset
.
I tried adding UrlGenerator class. But it says class not found.
I am struck here. Please can anyone help me.
EDIT:
For me even url() is not working correctly. Its not creating correct url. http://public/profile/pic.png
. Domain name is not getting added.
And also - I tried adding UrlGenerator class. But it says class not found.