Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lior305's avatar

Laravel URL helper

Hello guys,

so the problem is : i used {{ url('') }} and {{ asset('') }} for my entire project , and everything was fine ( i'm almost done even...). both url and asset used to take me to http://localhost:8080/Zeebay/public , as the base url. and now url and asset take me to http://localhost:8080

so that changed every path and route on my site. I am 100% sure i have not changed anything at the code, didn't touch .htaccess or anything like that.

what i suspect might have caused it is me clearing the history and the web browser Cached files.

i have tried fixing this over 5 hours, trying to check the url and asset through the core, played with the index.php. if this helps anyone, when i type http://localhost:8080/Zeebay/public/index.php , everything works fine, i can navigate the pages, but sometimes need to add /index.php/somepage. so i assume it has something with that.. cant figure it out. HELP :)

0 likes
5 replies
lior305's avatar
lior305
OP
Best Answer
Level 1

i have managed to solve this problem finally!, if anyone else gets the same. i found that the index.php at the htdocs folder ( of xampp ) caused the problem. you have to remove it, and when you type localhost at the url, click the project folder and viola, it works.

( it completly forgot that i have my own index.php at localhost/project/public ) and just ignored it.

1 like
renoirtech's avatar

@lior305 a good way to avoid this is to always use Laravel Vallet or Laravel Homestead, it boots up your development environment out of the box avoiding silly mistakes that stop our productivity.

1 like

Please or to participate in this conversation.