src/Commands/MigrateResetCommand.php
public function reset($component)
    {
        if (is_string($component)) {
            $component = $this->laravel['components']->findOrFail($component);
        }

        $migrator = new Migrator($component);

        $database = $this->option('database');

        if (!empty($database)) {
            $migrator->setDatabase($database);
        }

        $migrated = $migrator->reset();

        if (count($migrated)) {
            foreach ($migrated as $migration) {
                $this->line("Rollback: <info>{$migration}</info>");
            }

            return;
        }

        $this->comment('Nothing to rollback.');
    }
public function reset($component)
    {
        if (is_string($component)) {
            $component = $this->laravel['components']->findOrFail($component);
        }

        $migrator = new Migrator($component);

        $database = $this->option('database');

        if (!empty($database)) {
            $migrator->setDatabase($database);
        }

        $migrated = $migrator->reset();

        if (count($migrated)) {
            foreach ($migrated as $migration) {
                $this->line("Rollback: <info>{$migration}</info>");
            }

            return;
        }

        $this->comment('Nothing to rollback.');
    }
public function reset ( $ component ) { if ( is_string ( $ component ) ) { $ component = $ this -> laravel [ 'components' ] -> findOrFail ( $ component ) ; } $ migrator = new Migrator ( $ component ) ; $ database = $ this -> option ( 'database' ) ; if ( ! empty ( $ database ) ) { $ migrator -> setDatabase ( $ database ) ; } $ migrated = $ migrator -> reset ( ) ; if ( count ( $ migrated ) ) { foreach ( $ migrated as $ migration ) { $ this -> line ( "Rollback: <info>{$migration}</info>" ) ; } return ; } $ this -> comment ( 'Nothing to rollback.' ) ; }
Rollback migration from the specified component.

@param $component
Rollback migration from the specified component .