To be call after execute the command.

@param  Input $input
@param  Output $output
@return void
960025
public function handle(Input $input, Output $output)
    {
        $mode = "UP";
        $path = base_path('.env');

        try {
            if (!file_exists($path)) throw new \Exception(".env file is not exist.", 1);

            $old_mode = app_env('APP_MODE');
            if ($mode == $old_mode) throw new \Exception("Web mode is already {$mode}.", 1);

            file_put_contents($path, str_replace("APP_MODE={$old_mode}", "APP_MODE={$mode}", file_get_contents($path)));
            $output->writeln("Application Mode is now up!");

            return true;
        } catch (\Exception $e) {
            $output->writeln($e->getMessage());

            return $e->getMessage();
        }
    }
428310
public function handle(Input $input, Output $output)
    {
        $command = $input->getArgument('_command');

        try {
            if (!preg_match("/^[A-Z]\w*$/", $command)) throw new \Exception("Error: Invalid command name. It must be Characters and PascalCase.", 1);
            if (file_exists(app_path("Commands/{$command}.php"))) throw new \Exception("Error: The command name is already created.", 1);

            $output->writeln($this->makeTemplate($command) ?
                            "Successfully created." :
                            "File not created. Check the file path.");
        } catch (\Exception $e) {
            $output->writeln($e->getMessage());
        }
    }
623294
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $outputFile = null;
        if ($file = $input->getOption('output-file')) {
            $outputFile = $file;
        }
        $this->service($input->getArgument($this->argument), $outputFile);
    }
413362
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $actions = new Finder(APP_PATH, 'One\\Context\\Contracts\\Action', 'php');

        foreach ($actions as $action) {
            $this->output('Action', 'info', $action->getBasename('.php'), '');
        }
    }
464270
public function execute(InputInterface $input, OutputInterface $output)
    {
        $outputPath = DATADIR;

        $output->write(['', '  Generating install files...', ''], true);

        $this->dumpStructure($outputPath);
        $output->writeln('  Exported DB structure');

        $this->dumpData($outputPath);
        $output->write(['  Exported DB data', ''], true);
    }
983759
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setIo($input, $output);

        $repo = $this->prepareRepository();

        $this->rebuild();

        $this->deployWithGit($repo);
    }
105744
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->Selftest($input, $output);
        $this->Ping($input, $output);
        $this->Connect($input, $output);
    }
1109651
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;
        $this->formatter = $this->getHelper('formatter');
        $this->fs = new Filesystem();
    }
496129
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $created = $this->scaffold(
            'ajax',
            [
                'CLASSNAME' => $input->getArgument('name'),
            ],
            [
                'ACTION' => $input->getOption('action'),
            ]
        );

        if ($created === true) {
            $output->writeln("<info>{$input->getArgument('name')} was created successfully</info>");
        } else {
            $output->writeln("<error>{$input->getArgument('name')} could not be created</error>");
        }
    }
632971
private function setInputAndOutput(InputInterface $input, OutputInterface $output)
    {
        if (is_null($this->assistant)) {
            $this->assistant = new CommandAssistant();
            $this->assistant->setQuestionHelper($this->getQuestionHelper());
            $this->assistant->setKernel($this->getApplication()->getKernel());
        }
        $this->assistant->setOutput($output);
        $this->assistant->setInput($input);
    }
1025320
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $plugins = $this
            ->pluginManager
            ->loadPlugins();

        foreach ($plugins as $plugin) {
            $this->printMessage(
                $output,
                'Plugin',
                'Plugin "' . $plugin->getNamespace() . '" installed'
            );
        }

        $this->finishCommand($output);
    }
1164678
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $this->version = $this->getApplication()->getVersion();

        /**
         * Check for ancilliary options
         */
        if ($input->getOption('rollback')) {
            $this->rollback();

            return;
        }

        if ($input->getOption('check')) {
            $this->printAvailableUpdates();

            return;
        }

        $this->updateToDevelopmentBuild();
    }
251064
public function doRun(InputInterface $input, OutputInterface $output)
    {
        $name = $this->getCommandName($input);
        $result = true;

        if (isset($this->_callbacks['before'][$name])){

            $callbacks = $this->_callbacks['before'][$name];

            foreach($callbacks as $callback) {

                $result = call_user_func_array($callback, array($input, $output));

                if ($result === false) {
                    break;
                }
            }
        }

        if ($result !== false) {

            parent::doRun($input, $output);

            if (isset($this->_callbacks['after'][$name])) {

                $callbacks = $this->_callbacks['after'][$name];

                foreach ($callbacks as $callback) {
                    call_user_func_array($callback, array($input, $output));
                }
            }
        }
    }
563569
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output);

        Context::get('information-collector')->handleCommandInput($input);

        $this->getOutput()->writeBigTitle('Welcome to Release Management Tool');

        $this->executeActionListIfExist('prerequisites');
    }
428273
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');
        $aggregated = $this->inputsAggregator->getAggregated($name);
        if ($aggregated instanceof AbstractInput) {
            try {
                $output->writeln($aggregated->getValue());
            } catch (\Exception $e) {
                $output->writeln($e->getMessage());
            }
        } else {
            $output->writeln('This input does not exists');
        }
    }
21631
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setup->getLocator()->setParams(
            array(
                'release' => $input->getArgument('release'),
                'path' => $input->getOption('path'),
                'scriptName' => $input->getOption('script')
            )
        );

        $queries = $this->setup($input);

        $this->display($input, $output, $queries);
    }
152039
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->purgeMissingFamilies($output);
        $this->purgeMissingAttributes($output);
    }