【发布时间】:2018-11-21 07:51:42
【问题描述】:
我在下面有一个自定义迁移命令
use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
class MigrateAllCustomersCommand extends BaseMigrateCommand
{
private $count = 0;
public function __construct(Migrator $migrator)
{
parent::__construct($migrator);
}
public function handle()
{
$this->count += 1;
printf("%d,",$this->count);
$this->call('migrate');
}
}
php artisan migrate 无限运行,如以下输出所示:1,2,3,...,10000...
我该如何解决这个问题?
【问题讨论】:
-
你运行的是什么 laravel 版本?
标签: laravel database-migration