src/Console/MigrateRefreshCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $migrate = Migrate::new($input->getOption('dsn'), $input->getOption('path'), $output);

        if (! $migrate->exists()) {
            $output->writeln('<info>Migration table not found.</info>');
            return;
        }

        $step = $input->getOption('step');

        $step > 0 ? $migrate->rollback(compact('step')) : $migrate->reset();

        $migrate
            ->run()
            ->close();

        $output->writeln('');
        $output->writeln('<comment>Done</comment>');
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $migrate = Migrate::new($input->getOption('dsn'), $input->getOption('path'), $output);

        if (! $migrate->exists()) {
            $output->writeln('<info>Migration table not found.</info>');
            return;
        }

        $step = $input->getOption('step');

        $step > 0 ? $migrate->rollback(compact('step')) : $migrate->reset();

        $migrate
            ->run()
            ->close();

        $output->writeln('');
        $output->writeln('<comment>Done</comment>');
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { $ migrate = Migrate :: new ( $ input -> getOption ( 'dsn' ) , $ input -> getOption ( 'path' ) , $ output ) ; if ( ! $ migrate -> exists ( ) ) { $ output -> writeln ( '<info>Migration table not found.</info>' ) ; return ; } $ step = $ input -> getOption ( 'step' ) ; $ step > 0 ? $ migrate -> rollback ( compact ( 'step' ) ) : $ migrate -> reset ( ) ; $ migrate -> run ( ) -> close ( ) ; $ output -> writeln ( '' ) ; $ output -> writeln ( '<comment>Done</comment>' ) ; }
Execute command, captain.

@param \Symfony\Component\Console\Input\InputInterface $input
@param \Symfony\Component\Console\Output\OutputInterface $output
@return int|null|void
Execute command captain .