Answer the question
In order to leave comments, you need to log in
Vuejs components in a Laravel project. How to register components locally?
To register components on Laravel, I describe them in app.js in the components folder.
Vue.component('main-component', require('./components/Main.vue').default);
Vue.component('page-component', require('./components/MainComponents/Page.vue').default);
Vue.component('human-component', require('./components/MainComponents/PageComponents/Human.vue').default);
Vue.component('addhuman-component', require('./components/MainComponents/PageComponents/HumanComponents/AddHuman.vue').default);
Answer the question
In order to leave comments, you need to log in
Yes, globally. Local registration - inside the component. Looks like this.
<script>
export default {
name: "card",
components: {
'card': require('./card.vue'),
},
...
</spript>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question