我在Laravel 4上遇到了一些障碍。
由于我不能让artisan:migrate
从app/database/migrations
的内部文件夹中生成迁移 (例如: app/database/migrations/app1)
我在我的自定义命令app:migrate
中有这个问题。
/* default path */
$this->call('migrate');
/* custom path */
$this->call('migrate', array('--path' => 'app/database/migrations/app1'));
但我也希望有一个app:refresh
命令,它能够回滚所有来自自定义路径和默认路径的迁移。然后重新迁移和填充所有内容,就像migrate:refresh --seed
所做的一样。
我该如何撤销这个操作?调用:
$this->call('migrate:rollback', array('--path' => 'app/database/migrations/app1'));
会产生一个错误,提示说:
[InvalidArgumentException]
The "--path" option does not exist.
有人能帮忙吗?
谢谢!