Skip to content
Advertisement

How can I solve net::ERR_ABORTED 404 (Not Found) in a view, error dont let display the css Laravel 6.0?

I am doing a view and when I send the information that, I want to show to that view send the error that I show above and the view is displayed with html only. This error doesn’t happen when I did not send information to the view. I don’t know, how to solve it.

  • Says exactly like thisGET http://127.0.0.1:8000/entradas/1/comprar/1/detalle_ventaEntrada/200000/css/bootstrap.min.css net::ERR_ABORTED 404 (Not Found) and GET http://127.0.0.1:8000/entradas/1/comprar/1/detalle_ventaEntrada/200000/js/jquery.stellar.min.js net::ERR_ABORTED 404 (Not Found) in the console with every js or css in the stylesheet and scripts
  • Below I will let the code of my scripts, the links in the head and also the information I want to show

<link stylesheet="" href=""> and script ind head tag

JavaScript

scripts

JavaScript

things i want to show in the view

JavaScript

Advertisement

Answer

JavaScript

Here you can see your .css file is trying to load from this url, which is not correct.

Use laravel built in asset() function.

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

Which will point to public folder of your application so:

use asset('expamleFolder/bootstrap.js'), it will look for your bootstrap.js inside public/expamleFolder.

Note: always keep assets in public folder.


Replace this with old code

JavaScript

this is solution for that 2 error

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement