ARTICLE AD BOX
I’m working on upgrading an existing Laravel 8 project to Laravel 12, and I need some guidance on the best approach.
The current project is structured using custom packages/modules (each feature is organized as a separate package with its own controllers, models, routes, service providers, etc.). However, the team now wants to move away from this package-based architecture and instead use a standard core Laravel structure in a fresh Laravel 12 project.
So instead of maintaining separate packages, all code should be refactored into Laravel’s default directories (app/Models, app/Http/Controllers, routes, database, etc.).
My current approach is:
Create a fresh Laravel 12 project
Move code from each package into the appropriate Laravel directories
Refactor namespaces and remove package-specific service providers
Migrate module by module and test each part
I would like to know:
Is this the correct or recommended approach for this kind of migration?
What are the common pitfalls when converting from package-based architecture to core Laravel structure?
Are there better patterns (e.g., service layer, modular folders inside app/) to keep the code organized without using packages?
I’m a junior Laravel developer, so any practical advice or real-world experience would be really helpful.
Thanks!
