I've been at it for a while to get this csrf token to work with the vue.js example.
but it keeps saying i don't have a token. I've tried all kinds of variations.
bottom (not head, before end of body)
<script>
window.myToken = <?php echo json_encode([
'_token' => csrf_token(),
]); ?>
</script>
<script src="/js/manifest.js"></script>
<script src="/js/vendor.js"></script>
<script src="/js/app.js"></script>
html
<div id="app">
@section('content')
<example></example>
@endsection
</div>
console output
CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token
vendor.js:7635 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
Example doesn't seem to do much either, but I guess i need the token.