1
如果我在控制台中运行php artisan migrate:fresh --seed --force
一切都按预期工作。 输出逐个显示。工匠输出一个一个
Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Seeding: UsersTableSeeder
etc.
如果我从Laravel运行artisan命令,除了输出外,一切正常。它在所有操作的最后显示一次。
$this->info('Migrating and seeding the database...');
Artisan::call('migrate:fresh', [
'--seed' => true,
'--force' => true,
]);
$this->line(Artisan::output());
我寻找一种方法来显示工匠::输出()逐个对每个表(相同的行为等运行在控制台中的命令)。