So while on Twitch, streaming my current Laravel build I came up against something I have never thought about. How do I get Bootstrap.js from node modules into my Public JS folder without copy and pasting it in.
So to Gulp we go and for many this will be like I'm teaching you to suck eggs but for someone just starting out with Laravel and also Gulp its helps no end.
So the task here is to copy the JS script from one place to another in the same vain as when we gulp the sass files and compile. Laravel Elixir makes all these processes very easy with alot of things done for us out of the box.
So to the code! So by adding this through our Elixir function, Gulp grabs the file and places a nice little file into our destination.
So as we can see we call mix.copy followed by open and closing brackets and shut the line off. Then add the file path to whatever it is you want to copy over and after the comma, the destination. Then run Gulp and Hazzah! your file is in it's destination and you can go ahead and call it using a URL::asset or what ever way you see fit.
Again very simple but also very handy when you know how!
So you want to set up a new Laravel Install? Correct? Right ok so lets begin..... First...
It's a hard thing this day in age to decide what is best to do in terms of technology and how...