PHP Variables to JavaScript
Published on by Eric L. Barnes
Often, you’ll find yourself in situations, where you want to pass some server-side string/array/collection/whatever to your JavaScript. Traditionally, this can be a bit of a pain – especially as your app grows.
This is a new package from Jeffrey Way at Laracasts that will allow you to easily pass php variables to your JavaScript.
This has so many good use cases and I know it’s going into my workflow.
Eric is the creator of Laravel News and has been covering Laravel since 2012.