10 months ago

illuminate/database (+ migrations) outside Laravel

Posted 10 months ago by mrcorex

Hey guys. I am trying to find a good solution to use illuminate/database (+ migrations) outside Laravel.

I have the need of several packages (non-public) that are targeted for specific purposes. And they are going to be used in several projects, both Laravel and non-Laravel.

illuminate/database already requires illuminate/container, so I will of course go this way.

My goal is to have

  • Query builder
  • Models
  • Migrations

I am not new to Laravel, but need some guidance/ideas/comments in writing these packages. I have not been able to find anything on Google. There are only the classic titles "laravel migrations outside Laravel" and when you go to the page, it is all about Phinx.

It is not about the first 2 (Query Builder and Models) since explains it very well. I will however try to implement facades outside Laravel so developers still can use Laravels excellent documentation. I can implement facades by extending a facade class and override getFacadeApplication().

I have 3 questions:

  1. Do any of you know of any existing package(s) that include migration support?

  2. If no known packages, I can write a public package if there are the need for it. Any comments on that?

  3. How would you experienced Laravel Developers implement migrations?

Please sign in or create an account to participate in this conversation.