DEV Community

Discussion on: Build A Single Page App Using Laravel & Vue.js

Collapse
thisismoe profile image
Sidi Mohammed • Edited on

When using the example-component in the vue.blade.php template don't forget to:

1/ Encapsulate the content inside the body with a <div id="app">{{ content }}</div> so vue can mount the example-component.
2/ Add <link rel="stylesheet" href="{{ asset('css/app.css') }}"> after meta tags
3/ Add <script src="{{ asset('js/app.js') }}"></script> before ending body tag

Collapse
timmjensen profile image
Timm Jensen

Thank you so much! This is was needed! I was having trouble getting any vue component to show up in the template file, until this!

Collapse
thisismoe profile image
Sidi Mohammed

You're welcome, I am so glad that the effort did helped someone after forgetting about it 😊