I have just read this question and noticed a lot of the answers showing json encoding. I'm just wondering why? Is it for some kind of security? So for instance in Laravel would this be the correct way to pull stuff in
var date = '{!! json_encode($event->date) !!}',
parseDate = JSON.parse(date);
//use parseDate here.
Sorry for making a whole new question, but I don't have the rep to comment on the original question :/