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

alexhackney's avatar

How would you do this upgrade?

I've got a laravel app (V10) with vue2 components that I need to upgrade.

I've toyed with switching to Nuxt with Laravel continuing to be the backend, but I think I want to stick with Laravel and Vue3 but I think I want to use inertia as well.

SEO is critical and I want to switch to a multi-domain / tenant app setup so that the site can have multiple domains all with different content but built on the same app. Minor layout changes as well.

I think this will work and I'm pretty confident with the upgrade path but as I've been updating components to Vue 3 and thinking about how to switch to inertia, I wonder if I should just start a completely new laravel app and move the components over that way as I build it out.

I feel like I could just upgrade it in place, but I'm not sure if that's the most efficient way.

Right now, I'm not adding any features because I don't want to rebuild them later, but I've put this off as long as I can.

Am I correct to just do the upgrade in the same repo and build it out that way or should I switch to a new installation and move the parts over as I go?

0 likes
2 replies
LaryAI's avatar
Level 58

Upgrading a Laravel app with Vue components can be a significant task, especially when considering a switch from Vue 2 to Vue 3 and potentially integrating Inertia.js. Here’s a structured approach to help you decide whether to upgrade in place or start fresh:

Considerations for Upgrading in Place

  1. Codebase Familiarity: If you are deeply familiar with your existing codebase, upgrading in place might be more efficient. You can incrementally update components and test them as you go.

  2. Version Control: Ensure your current project is under version control (e.g., Git). This allows you to track changes and revert if necessary.

  3. Incremental Updates:

    • Vue 3: Start by updating your Vue components to Vue 3. Use the Vue 2 to Vue 3 migration guide to help with this process.
    • Inertia.js: Introduce Inertia.js gradually. Begin with less critical parts of your application to get accustomed to the new workflow.
  4. Testing: Implement automated tests if you haven’t already. This will help ensure that your application continues to function correctly as you make changes.

  5. SEO Considerations: Since SEO is critical, ensure that your server-side rendering (SSR) or pre-rendering setup is compatible with Vue 3 and Inertia.js.

  6. Multi-Domain/Tenant Setup: Consider using packages like spatie/laravel-multitenancy to handle multi-domain setups. This can be integrated into your existing app.

Considerations for Starting Fresh

  1. Clean Slate: Starting fresh can be beneficial if your current codebase is outdated or has accumulated technical debt. It allows you to implement best practices from the start.

  2. Learning Opportunity: Building a new app can be a great way to learn and apply new technologies like Vue 3 and Inertia.js without the constraints of legacy code.

  3. Parallel Development: You can develop the new app in parallel with the existing one, reducing downtime and allowing for a smoother transition.

  4. Migration Strategy: Plan a migration strategy to move data and features from the old app to the new one. This might involve writing scripts to transfer data or manually porting over features.

Recommended Approach

Given your situation, if the existing app is not overly complex and you are confident in your ability to manage the upgrade, upgrading in place might be the most efficient path. However, if the app is large, complex, or has significant technical debt, starting fresh could be more beneficial in the long run.

Steps to Upgrade in Place

  1. Backup: Ensure you have a complete backup of your current application and database.

  2. Upgrade Laravel: Make sure your Laravel app is fully updated to the latest version of Laravel 10.

  3. Upgrade Vue: Use the Vue CLI to upgrade your Vue components to Vue 3. Address any breaking changes as per the migration guide.

  4. Integrate Inertia.js: Install and configure Inertia.js. Start by converting a few pages to use Inertia and gradually expand.

  5. Implement Multi-Tenancy: Use a package like Spatie’s to handle multi-domain requirements.

  6. Test Thoroughly: Continuously test your application to ensure all features work as expected.

  7. Deploy: Once everything is stable, deploy your changes to production.

By following these steps, you can effectively upgrade your Laravel app while minimizing risks and ensuring a smooth transition to the new technologies.

martinbean's avatar

@alexhackney I think you need to actually decide on what libraries and packages you want to use. Your question just reads as a lot of, ”I want to use X, but I also want to use Y, but I also want to use Z.”

You also seem to have conflicting requirements. For example, you say you want to use Inertia, but then in your very next sentence you say SEO is critical. If SEO is critical, then I wouldn’t be looking at Inertia or Vue. Yes, you nay be able to use server-side rendering, but what’s the point of server-rendering a client-side app to render it on the server to then send to the client…? There’s nothing quicker or SEO-friendly than just sending semantic HTML to the user’s browser.

Please or to participate in this conversation.