moukbel
4 months ago
242
14
Laravel

asset() work with localhost , not with domain.local

Posted 4 months ago by moukbel

hi, I add a virtual host to my project myproject.local

the asset() doesn't work

  <img src="{{ asset('/icons/1.png') }}" alt="">

``GET http://myproject.local/icons/1.png 404 (Not Found)``

but seem to work well if I access it like this:

http://localhost/laravel/myproject/public/home

any idea ??

Please sign in or create an account to participate in this conversation.