Laravel project's all assets are giving 404 error Laravel project's all assets are giving 404 error nginx nginx

Laravel project's all assets are giving 404 error


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

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


You shouldn't write public directory to asset function

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

Also,

You can configure the asset URL host by setting the ASSET_URL variable in your .env file. This can be useful if you host your assets on an external service like Amazon S3:

// ASSET_URL=http://example.com/assets$url = asset('img/photo.jpg'); // http://example.com/assets/img/photo.jpg

https://laravel.com/docs/5.8/helpers#method-asset