How to create a project based on Laravel to be the basis of others?

Asked

Viewed 116 times

2

My idea is to create a base administrative panel, where I can use the next sites, without having to copy and paste. At the base I have only control of users and menus, the rest I create packages and require each new site only what is necessary. It’s all in packagist with webhook configured.
So when creating a new website, I do:

composer create-project meuusuario/meucms novo_projeto

So far so good, but I can’t leave other projects dependent on the base.

For example: if I have changed something in the database, others will update via Composer update. This is possible?

  • 1

    It is easier to base being a dependency of your project based on Laravel, no?

  • I got it, I’ll probably have to do it that way anyway. Thanks

1 answer

0


As you pointed out yourself, creating a project that will be used as a base will not create a dependency with the initial base. The repository will be cloned and later updates need to be done manually. The repository itself base application of Laravel uses this flow, where what changed from the moment you created the project will not be applied automatically.

This type of flow is cool if your dashboard is already mature and will not suffer so many changes.

Otherwise, the best thing to do is to create a package external to this project and use it as a dependency, so the panel code will be upgradeable from a composer update.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.