protected function reset($slug)
    {
        if (! $this->packages->exists($slug)) {
            return $this->error('Package does not exist.');
        }

        $this->requireMigrations($slug);

        //
        $this->migrator->setconnection($this->input->getOption('database'));

        $pretend = $this->input->getOption('pretend');

        while (true) {
            $count = $this->migrator->rollback($pretend, $slug);

            foreach ($this->migrator->getNotes() as $note) {
                $this->output->writeln($note);
            }

            if ($count == 0) break;
        }
    }
protected function reset($slug)
    {
        if (! $this->packages->exists($slug)) {
            return $this->error('Package does not exist.');
        }

        $this->requireMigrations($slug);

        //
        $this->migrator->setconnection($this->input->getOption('database'));

        $pretend = $this->input->getOption('pretend');

        while (true) {
            $count = $this->migrator->rollback($pretend, $slug);

            foreach ($this->migrator->getNotes() as $note) {
                $this->output->writeln($note);
            }

            if ($count == 0) break;
        }
    }
protected function reset ( $ slug ) { if ( ! $ this -> packages -> exists ( $ slug ) ) { return $ this -> error ( 'Package does not exist.' ) ; } $ this -> requireMigrations ( $ slug ) ; // $ this -> migrator -> setconnection ( $ this -> input -> getOption ( 'database' ) ) ; $ pretend = $ this -> input -> getOption ( 'pretend' ) ; while ( true ) { $ count = $ this -> migrator -> rollback ( $ pretend , $ slug ) ; foreach ( $ this -> migrator -> getNotes ( ) as $ note ) { $ this -> output -> writeln ( $ note ) ; } if ( $ count == 0 ) break ; } }
Run the migration reset for the specified Package.

Migrations should be reset in the reverse order that they were
migrated up as. This ensures the database is properly reversed
without conflict.

@param string $slug

@return mixed
Run the migration reset for the specified Package .