'utf8_general_ci', ]); DB::purge($connection); DB::reconnect($connection); DB::connection($connection)->statement('SET NAMES utf8 COLLATE utf8_general_ci'); if (!is_dir(base_path($path))) { mkdir(base_path($path), 0777, true); } $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); $input = new ArrayInput([ 'command' => 'migrate:generate', '--connection' => $connection, '--path' => $path, '--skip-log' => true, '--skip-views' => true, '--skip-proc' => true, '--ignore' => 'migrations', '--no-interaction' => true, ]); exit($kernel->handle($input, new ConsoleOutput));