Our setup is this:
I'm developing the Admin, my colleague is developing the app API.
They both use the same database, and most of the same tables. Merging them into a single project is not an option as we will deploy to Elastic Beanstalk and the Admin doesn't need to scale, since it will be used by a small number of people.
The issue we ran into is handling migrations, and we've arrived to the following conclusions:
While I can think of hacky ways of fixing this issue, we're looking for a best practices approach.
I would recommend the option of creating the third project that only has migrations. That way, you keep all the migrations in one place and avoid problems of inconsistency, and you decouple the migrations from the deployment of either app. The fact that the app doesn't "do" anything shouldn't matter; you don't need to deploy an extra app, just run the migrations from your deployment server. You don't actually have to create a whole Laravel project just for your migrations; it's fairly simple to use Eloquent outside of Laravel. This article gives an example of using the Eloquent query builder to run migrations outside of Laravel. You could also use a lightweight migrations tool like Phinx, which offers a similar feature set to Laravel's built-in migrations but with minimal dependencies.