Skip to content

Instantly share code, notes, and snippets.

@nutch31
Created September 25, 2019 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutch31/7f63e06229e5dcf16a5921235a4f843c to your computer and use it in GitHub Desktop.
Save nutch31/7f63e06229e5dcf16a5921235a4f843c to your computer and use it in GitHub Desktop.
require('./bootstrap');
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
const app = new Vue({
el: '#app'
})
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Example Component</div>
<div class="card-body">
I'm an example component.
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('component mounted.')
}
}
</script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Laravel + Vue</title>
</head>
<body>
<div id="app">
<example-component></example-component>
</div>
<script type="text/javascript" src="js/app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment