Closed sebian29 closed 5 years ago
I need Intregation too with vue
Hello guy!
It's work for me, you can try it.
Make sour you have vue-server-renderer version 2.5.0 or latest.
Create file => resources/js/components/App.vue
<template>
<div id="app">
{{ message }}
</div>
</template>
<script>
export default {
data() {
return {
message: 'Hello World'
}
}
}
</script>
Insert it to => resources/js/app.js
import App from './components/App.vue';
import Vue from 'vue';
new Vue({
el: '#app'
render: h => h(App)
});
run command:
$ npm run dev
Or $ npm run watch
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Vue/Laravel SSR App</title>
</head>
<body>
<div id="app"></div>
<script src="{{ asset('js/app.js') }}" type="text/javascript"></script>
</body>
</html>
And after you just create Route and Controller for view.
I hope it can help you to use Vue js with this package.
Is the issue actual?
Is the issue actual?
@RatanaKH solution works well :)
Hi jeroennoten,
Thank you for developing this awesome laravel-admin. Currently, I'm using your template and implementing vue js 2 for SPA. I just wanna know if it's possible to use vue-router on this template? Cause i did implement router-link on menu-item.blade.php but it always print the full url. Do you have an example to do this case?
Thank you so much and sorry for bad english.