December 2017
Beginner to intermediate
376 pages
7h 53m
English
Let's start work on our home page now. We'll first create a new component, HomePage:
$ touch resources/assets/components/HomePage.vue
For now, let's add placeholder markup to the component before we set it up properly.
resources/assets/components/HomePage.vue:
<template> <div>Vuebnb home page</div> </template>
Be sure to import this component in the router file, and uncomment the route where it's used.
resources/assets/js/router.js:
.... import HomePage from '../components/HomePage.vue'; import ListingPage from '../components/ListingPage.vue'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', component: HomePage }, { path: '/listing/:listing', component: ListingPage } ] });
Read now
Unlock full access