Execute the command.
555047
public function exec()
    {
        $name = $this->argument('name');
        $tableName = $this->argument('tableName');
        $count = $this->argument('count');
        $count = is_null($count) ? 10 : $count;

        //
        $process = Seeds::add($name, $tableName, $count);
        //
        $this->show($process, $name);
    }
995595
def execute_command(command=None):
    """"""
    process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stdin = process.communicate()
    process.wait()
    return (stdout, stdin), process.returncode
1227602
public function handle()
    {
        $this->info("Developed by the 5dmat-web.com team ");
        $this->info("Please Wait ...");
        $this->info("Indexing fields ".$this->argument('fields')." in table ".$this->argument('table')."  ...");
        DB::statement("ALTER TABLE {$this->argument('table')}  ADD FULLTEXT ({$this->argument('fields')})");
        $this->info("Done, Enjoy!");
        return;
    }
930399
def execute(self, command):
        '''
        
        '''
        process = Popen(command, stdout=PIPE, stderr=STDOUT, universal_newlines=True)
        while True:
            if process.poll() is not None:
                self.returncode = process.returncode  # pylint: disable=W0201
                break
            yield process.stdout.readline()
1030628
public function fire()
    {
        if (is_null($this->argument('name'))) {
            $this->installFromFile();

            return;
        }

        $this->install(
            $this->argument('name'),
            $this->argument('version'),
            $this->option('type'),
            $this->option('tree')
        );
    }
751412
public function handle()
    {
        parent::handle();

        $requestGenerator = new RequestGenerator($this->commandData);
        $requestGenerator->generate();

        $this->performPostActions();
    }
788946
public function handle()
    {
        $command = $this->option('command');

        ob_start();
        $result = $this->executeCode(
            trim(trim($command), ';').';'
        );
        $output = ob_get_clean();

        if (empty($output) === false) {
            $this->line($output);
            $result = null;
        }

        $this->getOutput()->write('=> ');
        switch (gettype($result)) {
            case 'object':
            case 'array':
                $this->line(var_export($result, true));
                break;
            case 'string':
                $this->comment($result);
                break;
            case 'NULL':
                $this->line('');
                break;
            default:
                is_numeric($result) === true ? $this->info($result) : $this->line($result);
                break;
        }
    }
732619
public function handle()
    {
        $cmd = collect(array_merge($this->getSeleniumDefaultCommand(), $this->getArguments()))
            ->except('driver', 'serverVersion')
            ->implode(' ');

        $this->info('Starting Selenium server v'.$this->argument('serverVersion'));
        $this->info("Using {$this->argument('driver')} driver");

        echo shell_exec($cmd.' '.$this->getSeleniumOptions());
    }
1136739
public function handle()
    {

        $this->modelName = $this->formatModel($this->argument('ModelName'));

        $this->modelPath = $this->formatModelPath($this->argument('ModelName'));

        if ( ! $this->chartExists()){

            $this->error('Error, can\'t find ' .$this->modelName . ' chart');
            die();

        }


        if ( $this->removeChartFromFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('Oops, something went wrong!');


    }
128262
public function handle()
    {
        $path = $this->cd_connector->ls("/", false, "branch")['data'];
        foreach ($path as $p){
            if($p['type']=='folder'){
                $this->info($p['value']);
            }else{
                $this->line($p['value']);
            }
        }
    }
318221
public function handle()
    {
        $generator = new Generator();
        $generator->generate(
            $path = getcwd().'/'.strval($this->argument('path')),
            strval($this->argument('namespace')),
            strval($this->argument('name'))
        );

        $this->info('Generated');
    }
76345
public function handle()
    {
        $this->abortCommandExecution();

        $this->groups = $this->option('group') ? $this->argument('group') : $this->askForGroups();
        $this->assignGroupsToAssignment();
    }
1207885
public function handle()
    {
        $this->line('Processing...');

        //get command arguments
        $message = $this->argument('message');
        $to      = $this->argument('to');
        $attach  = $this->argument('attach');

        //init client
        $this->initClient();

        //attach data
        $this->addAttachment($attach);

        //add to
        $this->addTo($to);

        //send
        $this->send($message);

        $this->info('Message sent');
    }
601975
public function handle()
    {

        $this->modelName = $this->formatModel($this->argument('ModelName'));

        $this->slug = $this->argument('Slug');

        $this->setCrudTokens();

        $this->setFilePaths();

        if ( $this->makeCrudFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('Oops, something went wrong!');


    }
236539
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        $this->migrator->setConnection($this->option('database'));

        // Next, we will check to see if a path option has been defined. If it has
        // we will use the path relative to the root of this installation folder
        // so that migrations may be run for any path within the applications.
        $this->migrator->run($this->getMigrationPaths(), [
            'pretend' => $this->option('pretend'),
            'step' => $this->option('step'),
        ]);
        // Once the migrator has run we will grab the note output and send it out to
        // the console screen, since the migrator itself functions without having
        // any instances of the OutputInterface contract passed into the class.
        foreach ($this->migrator->getNotes() as $note) {
            $this->output->writeln($note);
        }
        // Finally, if the "seed" option has been given, we will re-run the database
        // seed task to re-populate the database, which is convenient when adding
        // a migration and a seed at the same time, as it is only this command.
        if ($this->option('seed')) {
            $this->call('db:seed', ['--force' => true]);
        }
    }
1172386
public function fire()
    {
        $generator = new ConsoleGenerator([
            'name' => $this->argument('name'),
            'force' => $this->option('force'),
            'command' => $this->option('command'),
            'description' => $this->option('description'),
        ]);

        $generator->run();

        $this->info('Console created successfully.');
    }
1288968
public function handle(): void
    {
        $this->initCommands();

        foreach ($this->calls as $info) {
            if (! isset($info['command'])) {
                continue;
            }

            $params = (isset($info['params'])) ? $info['params'] : [];

            $this->line(PHP_EOL.$info['description']);

            switch ($info['type']) {
                case 'artisan':
                    $this->call($info['command'], $params);
                    break;
                case 'cli':
                    $process = new Process($info['command']);
                    $process->run();
                    break;
            }
        }
    }