So I\'m trying to migrate my jquery to vue framework instead, I\'m using laravel 5.6 with webpack to build my project but my vue components are not showing up.
when
Some time you have re install npm
npm install
npm run dev
Thats solved my problem.
I think you need to load app.js
before </body>
as below.
<body id="app" class="">
//sidebar
<script src=" {{ mix('js/app.js') }} "></script>
</body>
:post="@json($classPost)"
is your issue. @json
doesn't escape the output for use in a HTML attribute, which is why your screenshot of the source in the browser has that line in bright red - it's invalid (because of the "
characters in the resulting JSON, which end the attribute prematurely).
This'll do the trick:
:post="{{ json_encode($classPost) }}"
you have to load your /resources/js/app.js file.
put this inside your <head></head>
tag
<script src="{{ asset('js/app.js') }}" defer></script>