Does the way you add an external js link to a laravel application differs to how you add a css. I ask because I’ve been able to successfully add a css external file like this:
<link rel="stylesheet" type="text/css" href="{{asset('css/custom.css')}}"/>
When i do this however :
<script src="{{asset('js/autocomplete1.js')}}"></script>
On the console i get a 404 error that:
GET http://spanibox.com/%7B%7B%20route('searchajax')%20%7D%7D?term=a&type=EmpService 404 (Not Found)
2 things to consider when you try to answer:
- This works if i simply write up the javascript within my blade view
2.Not sure if this will be relevant but On firefox there us a warning:
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified