Add a 404 page
This commit is contained in:
parent
73358d0619
commit
624ad8ad86
3
resources/js/router-app.js
vendored
3
resources/js/router-app.js
vendored
@ -6,12 +6,15 @@ import BlogArticle from './views/BlogArticle.vue';
|
||||
import Snippets from './views/Snippets.vue';
|
||||
import Contact from './views/Contact.vue';
|
||||
|
||||
import NotFound from './views/NotFound.vue';
|
||||
|
||||
const routes = [
|
||||
{ path: '/', name: 'index', component: Home },
|
||||
{ path: '/blog', name: 'blog', component: Blog },
|
||||
{ path: '/blog/:year/:month/:day/:id-:slug', name: 'blog-article', component: BlogArticle, props: true },
|
||||
{ path: '/snippets', name: 'snippets', component: Snippets },
|
||||
{ path: '/contact', name: 'contact', component: Contact },
|
||||
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
|
||||
];
|
||||
|
||||
const router = VueRouter.createRouter({
|
||||
|
||||
19
resources/js/views/NotFound.vue
Normal file
19
resources/js/views/NotFound.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<page-header></page-header>
|
||||
|
||||
<container>
|
||||
{{ $route.params.pathMatch.pop() }}
|
||||
</container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeader from '../components/PageHeader.vue';
|
||||
import Container from '../components/Container.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PageHeader,
|
||||
Container
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user