Using Laravel 5, I have installed Moment.js through the npm install command. I am attempting to incorporate it into one of my views with Vue.js, but no matter what I try, I keep getting the error "moment is not defined." If I use require, I get "require is not defined." Below is the script section of my view:
<script>
var order = new Vue({
el: '#create_order',
data: {
moment: moment,
event_id: '',
event_type: '',
ticket_types: [],
time_slots: [],
current_timeslots: [],
start_date: null,
end_date: null
},
methods: {
moment: function (date) {
return moment(date);
},`
I am a beginner at this, so please provide as much explanation as possible. Thank you.