First off, I have to precise that I'm quite new to Laravel and that I have a lot to learn.
In one of my controller I need to call a Javascript function. To do so, I simply
echo "<script>triggerPixel();</script>";
I'm just unsure about where to store my Javascript file containing that function.
From what I got for the moment is that I should use elixir to add a file with something like this in the gulpfile.js :
mix.scripts('myscript.js');
Is this the right way to do it or should I simply add a file in resources/assets/javascripts ? I'm a bit lost and some explanation would be welcome.
Thanks !
tag end.
– Anand Pandey Jul 20 '17 at 09:53