In Laravel 5, I set up a simple external js file inside public/js/test.js
It has one line of code:
alert(1);
I included the file like so in view:
{{Html::script('js/test.js')}}
When the page load, I got
Uncaught SyntaxError: Unexpected token ILLEGAL
error from that javascript file.
I tested running the same test.js
file in my MAMP setup, and it run fine. So, the file has no issue. I cannot figure out what in Laravel 5 is causing the issue.
Please help.