Laravel 5 External JavaScript Files_ JavaScript stack

the following JavaScript is working perfect in side the test.blad.php file
but when i made external test.js file at the browser i get some thing like


instead of


the code in test.js file is :

  if(event.keyCode == 13){            
            var j_barcode = $('#barcode').val();      
   $.get("{{url('/barcode')}}", {j_barcode:j_barcode},   function(data) {   
         console.log(data) ;
        //success data                                             
         $.each(data,function(i, obj){       
            document.getElementById("item").value =obj.itemName;
            document.getElementById("itemId").value =;

            console.log(data) ;



and the route.php

Route::get('/barcode'    , 'testController@getBarcode');

at last i decleared the test.js in test.blade.php as

<script  type="text/javascript" src="/hsm/js/test.js" ></script>

68 thoughts on “Laravel 5 External JavaScript Files_ JavaScript stack”

  1. 819910 63548The vacation delivers on offer are : believed a selection of some with the most selected and in addition budget-friendly global. Any of these lodgings tend to be really used along units may possibly accented by indicates of pretty shoreline supplying crystal-clear turbulent waters, concurrent with the Ocean. hotels packages 56960


Leave a Comment