You can set the layout property on the Page to null
If needed, you can disable the default layout on specific pages by setting the layout to null.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone,
I have a question, I want to exclude the Login, Register components from default Layout. The rest of the components still use default Layout
So how I can do it in the component
There is my code
createInertiaApp({
resolve: name => {
const page = require(`./Pages/${name}`).default
if (page.layout === undefined) {
page.layout = Layout
}
return page
},
setup({el, App, props, plugin}) {
createApp({render: () => h(App, props)})
.use(plugin)
.mount(el)
},
})
Thanks
@datlechin you set the layout property in the Page component itself:
// resources/js/Pages/Login.vue
export default {
// ...
layout: null
}
Please or to participate in this conversation.