From 3d951a7c8a41747cab75bc1bb42871c829aa6036 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Thu, 26 Jun 2025 13:55:36 +0200 Subject: [PATCH] Docs about the `inertia.ensure_pages_exist` config --- resources/js/Pages/pages.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/Pages/pages.jsx b/resources/js/Pages/pages.jsx index 59a89e0e..2a6e238e 100644 --- a/resources/js/Pages/pages.jsx +++ b/resources/js/Pages/pages.jsx @@ -148,6 +148,11 @@ export default function () { }, ]} /> +

+ If you attempt to render a page that does not exist, the response will typically be a blank screen. To prevent this, you may set the {' '} + inertia.ensure_pages_exist configuration option to true. The Laravel adapter will then throw an{' '} + Inertia\ComponentNotFoundException when a page cannot be found. +

Creating layouts

While not required, for most projects it makes sense to create a site layout that all of your pages can extend.