I'm currently working on a project that involves Vue JS within a Laravel Project
Can someone guide me on how to fetch data from another JS file?
Here's what I have so far:
MainComponent.vue
data() {
return this.getData()
}
DataComponent.js
module.exports = {
getData() {
variable1: [],
variable2: []
}
};
I'm not sure if I'm doing this correctly, so any help would be appreciated. Thank you!