I need to include a js file in my views.
But in this js file i need to interpret somes PHP variable.
Actually i do this :
@section('javascript')
<script>
alert("{{{test}}}");
</script>
@stop
But i REALLY need to do this :
@section('javascript')
{!! Html::script('js/test.js') !!}
@stop
test.js :
alert("{{{test}}}");
I need to declare a lot o variable. So my JS file will be very huge. And i don't want to show this directly in the source code.
How can i do ? Thank you !