Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel project's all assets are giving 404 error

I am developing a Laravel project. It is under 5.7 Laravel version. I am using Homestead as a local development environment. When I run any route in the project, it doesn't load public assets. instead, it gives 404 error. see attached image below.

I coded correctly on getting assets path

{{ asset("public/js/frontend/jquery.min.js") }}

enter image description here

but all these assets are existing in the project folder. and when i try to go any of those assets, it gives laravel's 404 error.see below image.

enter image description here

It would be great if anyone can give me a solution for this. Thanks in advance.

like image 229
Deemantha Avatar asked Oct 18 '25 08:10

Deemantha


1 Answers

As suggested by @Douwe de Haan you don't have to use the public part, just call

{{ asset("js/frontend/jquery.min.js") }}
like image 190
Erick Castrillo Avatar answered Oct 21 '25 07:10

Erick Castrillo