laravel multiple databases with multiple migration tables

前端 未结 1 656
独厮守ぢ
独厮守ぢ 2021-02-09 04:02

I am trying to set up a multiple database application in laravel 5. I have a database A and a second database B. In database A there are my main models. Now I tried to write a m

1条回答
  •  攒了一身酷
    2021-02-09 04:25

    I found it out with the help of this Use one Laravel migrations table per database and post the answer here for others.

    In order to separate the migrations you need to run the migrate command with the database option like this:

    php artisan migrate --database="nameOfConnection"
    

    0 讨论(0)
提交回复
热议问题