The public_path() function does not intend to be use to serve browser friendly uri, so you're right, you should use url('/') instead.
It returns the absolute path because you might need some way to return that path if you're handling files on the server that can also be accessed publicly...something like PDFs. As codextends said, just use the url helper.
Okay thanks! I wasn't really aware of it.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community