From 624ad8ad861adaa374e4b0b75cb85941e88ae5f6 Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Wed, 1 Sep 2021 23:28:13 +0200 Subject: [PATCH] Add a 404 page --- resources/js/router-app.js | 3 +++ resources/js/views/NotFound.vue | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 resources/js/views/NotFound.vue diff --git a/resources/js/router-app.js b/resources/js/router-app.js index 22394b4..d000e31 100644 --- a/resources/js/router-app.js +++ b/resources/js/router-app.js @@ -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({ diff --git a/resources/js/views/NotFound.vue b/resources/js/views/NotFound.vue new file mode 100644 index 0000000..528dffa --- /dev/null +++ b/resources/js/views/NotFound.vue @@ -0,0 +1,19 @@ + + +