98
rated 0 times
[
100]
[
2]
/ answers: 1 / hits: 28522
/ 11 Years ago, tue, august 6, 2013, 12:00:00
My home page had some inline javascript that was mixed up with some blade syntax e.g.
<script type=text/javascript>
@if(Auth::user())
if(path.indexOf('/user/' + {{Auth::user()->id}} ) != -1) {
$( #tabs ).tabs();
};
@endif
</script>
It worked until I wanted to move the javascript to an external file.js. I got error whenever blade syntax was added. Is there a way I can fuse blade syntax in my javascript files.js? I tried renaming to file.blade.js with no luck...
More From » laravel