Execute the command.
165991
public function exec()
    {
        $name = $this->argument('name');
        $process = Links::create($name);
        //
        $this->show($process, $name);
    }
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;
    }
100345
public function handle()
    {
        $this->currentRoot = trim($this->laravel->getNamespace(), '\\');

        $this->setAppDirectoryNamespace();
        $this->setBootstrapNamespaces();
        $this->setConfigNamespaces();
        $this->setComposerNamespace();
        $this->setDatabaseFactoryNamespaces();

        $this->info('Application namespace set!');

        $this->composer->dumpAutoloads();

        $this->call('optimize:clear');
    }
857746
public function fire()
    {
        $packageName = $this->argument('packageName');
        $version = $this->argument('version');
        $version = unserialize(base64_decode($version));
        $this->postProcess($packageName, $version);
    }
1008835
public function handle()
    {
        if (is_null($this->argument('name'))) {
            $this->installFromFile();

            return;
        }

        $this->install(
            $this->argument('name'),
            $this->argument('version'),
            $this->option('type'),
            $this->option('tree')
        );
    }
355924
public function handle()
    {
        // Write in environment file.
        $path = base_path('.env');
        $env = file($path);

        // Detect existing configuration.
        if ($this->hasExistingConfiguration($env)) {

            if ($this->option('preserve')) {
                return;
            }

            if (! $this->option('overwrite')) {
                if (! $this->confirm("Overwrite existing configuration?")) {
                    return;
                }
            }

            $this->removeExistingConfiguration($env);
        }

        $this->writeNewConfiguration($env, $path);
        $this->info("FakeId configured correctly.");
    }
607912
public function handle()
    {
        if ($this->arguments()->getOption('country', false)) {
            $this->writeln('Country specified was ' . ucfirst($this->arguments()->getOption('country')) . '.');
            $this->exitWithSuccess();
        }
        $this->writeln('Flags huh? - Run this helloworld.php flags --country="england" and see what happens!');
        $this->exitWithError();
    }
1086794
public function handle()
    {

        // setup for crud

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

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



        $this->setCrudTokens();


        $this->setFilePaths();



        // setup for views

        $this->setConfigFromInputs();


        // runs all commands

        if  ($this->makeCrudFiles() &&
             $this->makeViewDirectory()->makeViewFiles($this->templateType)){

            $this->sendSuccessMessage();

            return;

        }


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


    }
1103738
public function handle()
    {
        $this->abortCommandExecution();
        if (! $this->argument('action') || $this->argument('action') == 'list') {
            $this->listEnvVariables();
            return;
        }

        if ($this->argument('action') == 'edit') {
            $this->editEnvVariables();
            return;
        }

        if ($this->argument('action') == 'check') {
            $this->checkEnvVariable();
            return;
        }
    }
656622
public function handle()
    {
        foreach ($this->schedule->dueEvents($this->laravel) as $event) {
            if (! $event->filtersPass($this->laravel)) {
                continue;
            }

            if ($event->onOneServer) {
                $this->runSingleServerEvent($event);
            } else {
                $this->runEvent($event);
            }

            $this->eventsRan = true;
        }

        if (! $this->eventsRan) {
            $this->info('No scheduled commands are ready to run.');
        }
    }
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]);
        }
    }
326173
public function handle()
    {
        $this->abortCommandExecution();
        $this->remotePath = $this->domain . '/.env';
        $this->runScp($this->localPath, $this->remotePath, null, true);
    }
1185488
public function handle()
    {
        $this->events->fire('command.updating', $this);
        $this->events->fire('command.cacheconfig', $this);
        $this->events->fire('command.cacheroutes', $this);
        $this->events->fire('command.publishvendors', $this);
        $this->events->fire('command.runmigrations', $this);
        $this->events->fire('command.updatecache', $this);
        $this->events->fire('command.extrastuff', $this);
        $this->events->fire('command.updated', $this);
    }
1132026
public function handle()
    {
        $this->doComment('Starting Model Generate Command', true);
        $this->getOptions();

        $tables = [];
        $path = $this->options['folder'];
        $modelStub = file_get_contents($this->getStub());

        // can we run?
        if (strlen($this->options['table']) <= 0 && $this->options['all'] == false) {
            $this->error('No --table specified or --all');

            return;
        }

        // figure out if we need to create a folder or not
        if($this->options['folder'] != app()->path()) {
            if(! is_dir($this->options['folder'])) {
                mkdir($this->options['folder']);
            }
        }

        // figure out if it is all tables
        if ($this->options['all']) {
            $tables = $this->getAllTables();
        } else {
            $tables = explode(',', $this->options['table']);
        }

        // cycle through each table
        foreach ($tables as $table) {
            // grab a fresh copy of our stub
            $stub = $modelStub;

            // generate the file name for the model based on the table name
            $filename = studly_case($table);

            if ($this->options['singular']){
                $filename = str_singular($filename);
            }

            $fullPath = "$path/$filename.php";
            $this->doComment("Generating file: $filename.php");

            // gather information on it
            $model = [
                'table'     => $table,
                'fillable'  => $this->getSchema($table),
                'guardable' => [],
                'hidden'    => [],
                'casts'     => [],
            ];

            // fix these up
            $columns = $this->describeTable($table);

            // use a collection
            $this->columns = collect();

            foreach ($columns as $col) {
                $this->columns->push([
                    'field' => $col->Field,
                    'type'  => $col->Type,
                ]);
            }

            // reset fields
            $this->resetFields();

            // replace the class name
            $stub = $this->replaceClassName($stub, $table);

            // replace the fillable
            $stub = $this->replaceModuleInformation($stub, $model);

            // figure out the connection
            $stub = $this->replaceConnection($stub, $this->options['connection']);

            // writing stub out
            $this->doComment('Writing model: '.$fullPath, true);
            file_put_contents($fullPath, $stub);
        }

        $this->info('Complete');
    }
724974
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        // Next we'll gather some of the options so that we can have the right options
        // to pass to the commands. This includes options such as which database to
        // use and the path to use for the migration. Then we'll run the command.
        $database = $this->input->getOption('database');

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

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

        // If the "step" option is specified it means we only want to rollback a small
        // number of migrations before migrating again. For example, the user might
        // only rollback and remigrate the latest four migrations instead of all.
        $step = $this->input->getOption('step') ?: 0;

        if ($step > 0) {
            $this->runRollback($database, $path, $step, $force);
        } else {
            $this->runReset($database, $path, $force);
        }

        // The refresh command is essentially just a brief aggregate of a few other of
        // the migration commands and just provides a convenient wrapper to execute
        // them in succession. We'll also see if we need to re-seed the database.
        $this->call(
            'mongolid-migrate',
            [
                '--database' => $database,
                '--path' => $path,
                '--realpath' => $this->input->getOption('realpath'),
                '--force' => $force,
            ]
        );

        if ($this->needsSeeding()) {
            $this->runSeeder($database);
        }
    }
486692
public function execute()
    {
        $command = new \ReflectionClass($this);
        $options = input()->get();

        if (empty($options)) {
            $this->optionHelp();
        } else {

            foreach ($options as $method => $arguments) {

                if (array_key_exists('-' . $method, $this->commandOptionsShortcuts)) {
                    $method = $this->commandOptionsShortcuts[ '-' . $method ];
                }

                $optionMethod = camelcase('option-' . $method);

                if ($command->hasMethod($optionMethod)) {

                    $commandMethod = $command->getMethod($optionMethod);

                    if ($commandMethod->getNumberOfRequiredParameters() == 0) {
                        call_user_func([&$this, $optionMethod]);
                    } elseif ($commandMethod->getNumberOfRequiredParameters() > 0 and empty($arguments)) {
                        if (isset($this->commandOptions[ $method ][ 'help' ])) {
                            output()->write(
                                (new Format())
                                    ->setContextualClass(Format::INFO)
                                    ->setString(language()->getLine('CLI_USAGE') . ':')
                                    ->setNewLinesBefore(1)
                                    ->setNewLinesAfter(1)
                            );

                            output()->write(
                                (new Format())
                                    ->setContextualClass(Format::INFO)
                                    ->setString(language()->getLine($this->commandOptions[ $method ][ 'help' ]))
                                    ->setNewLinesAfter(2)
                            );
                        }
                    } else {
                        $optionArguments = is_array($arguments)
                            ? $arguments
                            : [$arguments];

                        call_user_func_array([&$this, $optionMethod], $optionArguments);
                    }
                }
            }
        }
    }
888622
public function handle()
    {
        $this->files->put($this->getOutputPath(), $this->getRouteDefinitions());

        $this->info('Models scanned!');
    }