Пример #1
0
 /**
  * Create a new migration rollback command instance.
  *
  * @param \Speedwork\Database\Migration\Migrator $migrator
  *
  * @return \Speedwork\Database\Migration\Console\StatusCommand
  */
 public function __construct(Migrator $migrator)
 {
     parent::__construct();
     $this->migrator = $migrator;
 }
 /**
  * Get migration path (either specified by '--path' option or default location).
  *
  * @return string
  */
 protected function getMigrationPath()
 {
     if (!is_null($targetPath = $this->option('path'))) {
         return $this->app->basePath() . '/' . $targetPath;
     }
     return parent::getMigrationPath();
 }