There are many resources available to learn Vue.js for Laravel. Here are a few suggestions:
-
The official Vue.js documentation is a great place to start. It provides a comprehensive guide to Vue.js and covers all the basics.
-
Laracasts has a series of video tutorials on Vue.js for Laravel. You can find them here: https://laracasts.com/series/learn-vue-2-step-by-step
-
Vue Mastery is another great resource for learning Vue.js. They have a free course on Vue.js fundamentals that you can check out here: https://www.vuemastery.com/courses/intro-to-vue-js/vue-instance
-
If you prefer reading, you can check out the book "Learning Vue.js 2" by Olga Filipova. It covers all the basics of Vue.js and provides practical examples.
Here's a simple example of how to use Vue.js with Laravel:
<!-- app.blade.php -->
<html>
<head>
<title>My App</title>
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>
<body>
<div id="app">
<h1>{{ message }}</h1>
</div>
<script src="{{ asset('js/app.js') }}"></script>
</body>
</html>
// app.js
require('./bootstrap');
window.Vue = require('vue');
const app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
});