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

stevenh's avatar

Laravel + Vue SPA with some MPA (no Inertia.js)?

Hi all,

I'm just about to start a new app with Laravel 8 and looking at the different options for structuring it.

95% of the app would be accessible only to authenticated users. The only parts that would be publicly viewable and need to be SEO-friendly would be a landing page and some information pages about the app.

I'm not keen on the Inertia.js approach because I've not used it before and don't think there would be big gains in my case where most of the app doesn't need to be SEO-friendly. I'd also like to keep the Vue front end separate just in case I swap it out to a different framework in the future or want to build a phone app later would need a Laravel API.

So, what I was thinking of is having standard Laravel web routing and blade templates for the landing/info pages and then authentification with Sanctum and an API for the SPA. I was also thinking of splitting the code on the front end - a light SEO-friendly part for guests using the MPA, and then the heavier SPA code for the authenticated users.

Up till now, I have experience only developing Laravel MPAs with standard session authentication, Vue components and Vuetify. I'm not sure if what I had in mind above would be a big learning curve that would complicate things and slow me down a lot.

Is what I had in mind a good approach or should I just do things the simpler/quicker Inertia.js way?

0 likes
1 reply
PaulMaxOS's avatar

Hi @stevenh ,

i switched to inertia the moment Laravel 8 came out and I love it. If you know Vue you will work yourself in very quickly as it's basically Vue but without the routing part which is handled through your routes and controllers.

Personally I love the simplicity of having both frontend and backend together without the hassle of having a separate SPA where I basically need to come up with everything from scratch and do the same stuff all over. On top I don't need to take care of any application load balancing or reverse proxying because everything is tied together when it comes to URL structure.

But I do here you regarding the SEO stuff. As far as I understand things, you are not bound to the Inertia stuff. So you can return regular Views on certain routes that could stick to the old fashioned way. It's your controller so it's up to you what you do inside of it.

When you already know that you'll have a mobile app for which you'll need an API then you could try to build things, having this in mind. But if you aren't sure about it, personally I would start just building things and progress as needed.

P.S.: Maybe you give this podcast a shot to find out more about Inertia: https://fullstackradio.com/127

1 like

Please or to participate in this conversation.