Skip to content

Instantly share code, notes, and snippets.

@moradi-morteza
Last active April 16, 2020 13:34
Show Gist options
  • Save moradi-morteza/8ac182f24c7c44b857eb4698af58879f to your computer and use it in GitHub Desktop.
Save moradi-morteza/8ac182f24c7c44b857eb4698af58879f to your computer and use it in GitHub Desktop.
[laravel+vujs] #LaravelT
//https://router.vuejs.org/
// resources app.js
window.Vue = require('vue');
// router ----------https://router.vuejs.org/
import VueRouter from 'vue-router'
Vue.use(VueRouter);
let routes = [
{ path: '/dashboard', component: require('./components/Dashboard.vue').default },
{ path: '/users', component: require('./components/Users.vue').default },
{ path: '/profile', component: require('./components/Profile.vue').default }
];
const router = new VueRouter({mode:'history', routes});
const app = new Vue({
el: '#app',
router
});
//https://github.com/cretueusebiu/vform
npm i axios vform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment