hardeepcoder
hardeepcoder

Reputation: 41

laravel mix build successfully but vue.js new component not working or any changes not appearing

First time i am using vue.js in my laravel app. every-time message appear that laravel mix build successfully but my vie.js comment changes not displaying.

require('./bootstrap');
Vue.component('example', require('./components/Example.vue'));
Vue.component('my-vuetable', require('./components/MyVuetable.vue'));

const app = new Vue({

el: '#app'

});

i forget to run any important command ?

view:

 <div class="content">
        <div class="title m-b-md">
            Laravel
        </div>
        <div id="app">

          <example></example>
        </div>
 </div>

Component

<template>
   <div class="container">
      <div class="row">
         <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
               <div class="panel-heading">
                  <h1>Example Component</h1>
               </div>
               <div class="panel-body"> I'm an example component 5 </div>
            </div>
         </div>
      </div>
   </div>
</template>
<script> 
    export default { 
        mounted() { 
            console.log('Component mounted.')
        }
    } 
</script>

Upvotes: 1

Views: 1511

Answers (1)

David Chilufya
David Chilufya

Reputation: 21

in bootstrap.js look for 'X-CSRF-TOKEN': window.Laravel.csrfToken, and comment it out

Upvotes: 1

Related Questions