Skip to content

Commit 80a9973

Browse files
authored
Merge pull request #420 from inertiajs/ensure-pages-exists
Docs about the `inertia.ensure_pages_exist` config
2 parents 32e0bc3 + 3d951a7 commit 80a9973

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

resources/js/Pages/pages.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ export default function () {
148148
},
149149
]}
150150
/>
151+
<P>
152+
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 {' '}
153+
<Code>inertia.ensure_pages_exist</Code> configuration option to <Code>true</Code>. The Laravel adapter will then throw an{' '}
154+
<Code>Inertia\ComponentNotFoundException</Code> when a page cannot be found.
155+
</P>
151156
<H2>Creating layouts</H2>
152157
<P>
153158
While not required, for most projects it makes sense to create a site layout that all of your pages can extend.

0 commit comments

Comments
 (0)