I have 2 databases so I work under 2 different migration folders. I choose path, which works fine.
php artisan migrate --path="database/migrations/game"
I added a new connection next to the existing mysql connection in config/database.php:
'mysql' => [ ....default connection ]
'mysql_game_base' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),....bla bla
And than I added this connection as follows in my migration folder:
Schema::connection("mysql_game_base")->create('players', function (Blueprint $table) {
$table->increments('id');
$table->string("name");
$table->timestamps();
});
But the migration process keeps creating all tables into the default connection.
I also tried to add a database parameter, but still no chance:
php artisan migrate --path="database/migrations/game" --database="mysql_game_base"