Okay when i add the:
<div id="app">
<example-component></example-component>
</div>
In the master blade template before the scripts tag its working, but when i add this in an @yield('content') it won't.
Any ideas why ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
im new to Vue and i want to try it i have an problem with the example component.
it shows [Vue warn]: Cannot find element: #app
I have the following:
window.Vue = require('vue');
Vue.component('example-component', require('./components/ExampleComponent.vue'));
const app = new Vue({
el: '#app'
});
In blade view
<div id="app">
<example-component></example-component>
</div>
What im missing? i have added the defer to script again the same error.
Please or to participate in this conversation.