Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Max100's avatar

Persistent Layout in Breeze/Vue

I'm using Laravel Breeze/Vue and I'm confused about something.

In episode 12 (Persistent Layouts) of 'Building Modern Laravel Apps using Inertia.js', Jeffery Way explains how to configure things so the vue page is a child of the layout, rather than destroying the layout each time a new vue is rendered (@ 2:00) . But I don't understand how to get it to work.

Basically, the method he suggests is to add something like this:

export default { layout: AuthenticatedLayout };

But Breeze is using with the composition api and it does not accept the export default.

How should I implement this persistent layout approach in Breeze using the composition api?

0 likes
3 replies
Max100's avatar

@idew Thanks, I'll give that a try. I actually tried that earlier, but I had the script setup first. I'll give it a try and will check back.

I find the options vs composition api stuff confusing when looking at different documentation.

Thanks again!

Max100's avatar

@idew I tried it and it didn't work having much the same problems and errors, but it behaved slightly differently. I think I can work around it in this case, but it raises a larger question for me.

It seems a lot of vue 2 and options api code uses export default. But is export default {} appropriate for use in the composition api? If so, how should it be coded. If not, what should be done instead?

Please or to participate in this conversation.