1 year ago

Not working Laravel + Vuejs in laravel app

Posted 1 year ago by Flex

working with Laravel 5.7 and Vue Js. this is app.js

let Myheader = require('./components/Myheader.vue');
let Myfooter = require('./components/Myfooter.vue');

const app = new Vue({
    el: '#app',

blade.php file

<div id="app">
<script src="{{ asset('js/app.js')}}"></script>  

but when I run npm run watch command it is not displayed vue component. how can fix this problem?

my console output is,

[Vue warn]: Failed to mount component: template or render function not defined. found in ---> <Myfooter> <Root>

how can fix this problem?

Please sign in or create an account to participate in this conversation.