JRivera294
JRivera294

Reputation: 309

Laravel public_path() return C:\xampp\htdocs\ instead of http://localhost/

Im trying to generate an url with the public_path() method, but I need the Htpp://localhost/... url, not the C:\xampp\htdocs... directory.

Im reading that I can modify the bootstrap/paths.php file but I dont know f it would be the right way.

Upvotes: 0

Views: 2081

Answers (1)

Jeff Lambert
Jeff Lambert

Reputation: 24661

public_path() returns just that, a path to a directory and not a URL. If you want the URL to your site, try using URL::to('/')

Upvotes: 4

Related Questions