Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created April 21, 2020 01:29
Show Gist options
  • Save blogcacanid/f8d8116d3054b5684ca48bfe975394d8 to your computer and use it in GitHub Desktop.
Save blogcacanid/f8d8116d3054b5684ca48bfe975394d8 to your computer and use it in GitHub Desktop.
router.js Integrasi Laravel 7 Dan Vue.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from './views/Home.vue'
import About from './views/About.vue'
import Contact from './views/Contact.vue'
Vue.use(VueRouter)
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
name: 'home',
component: Home
},
{
path: '/about',
name: 'about',
component: About
},
{
path: '/contact',
name: 'contact',
component: Contact
}
]
})
export default router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment