Support the ongoing development of Laravel.io →
Packages Architecture

I am relatively new to Laravel and my project is expanding, I need to separate it into different packages to have a structure similar to that of django's apps.

I created a package to be responsible for data such as repositories, models and interfaces so that I can re-use them in the other packages such as an API package and admin package.

Should I be autoloading my models and repository classes or should I reference them explicitly when needed from another class in another package through the namespace ?

Is there a guide or resource that explains the best practices and steps to take when implementing such a structure for an application ?

Thanks!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.