Execute Commands.

@return void
974606
public function run()
    {
        if(\count($this->option) === 0) {
            return $this->help();
        }
        else {
            return $this->executeHelp($this->option[0]);
        }
    }
818060
public function exec()
    {
        $class = $this->argument('className');
        $table = $this->argument('tableName');
        //
        if (is_null($table)) {
            $table = $class;
        }
        //
        $notAliased = $this->option('not_aliased');
        //
        $process = Model::create($class, $table, $notAliased);

        if (!$notAliased) {
            $class = ucfirst($class);
            //
            Alias::update('models.'.$class, 'App\Model\\'.$class);
        }
        //
        $this->show($process, $class);
    }
491644
public function handle()
    {
        $updates = new Updates();
        $updates->updateInstall();

        $this->progressBar = $this->output->createProgressBar(6);

        $this->info("
        ________________________________________________________________
               ____    _____     _____   _    _   _____   _____
              / __ \  |  __ \   / ____| | |  | | |_   _| |  __ \
             | |  | | | |__) | | |      | |__| |   | |   | |  | |
             | |  | | |  _  /  | |      |  __  |   | |   | |  | |
             | |__| | | | \ \  | |____  | |  | |  _| |_  | |__| |
              \____/  |_|  \_\  \_____| |_|  |_| |_____| |_____/
                             
                             Installation started. Please wait...
                             Version: $updates->currentVersion
        ________________________________________________________________
        ");

        sleep(1);

        $this
            ->checkInstall()
            ->executeCommand('migrate')
            ->executeCommand('vendor:publish',
                [
                    '--force' => true,
                    '--tag'   => 'migrations',
                ])
            ->executeCommand('vendor:publish', [
                '--provider' => FoundationServiceProvider::class,
                '--force'    => true,
                '--tag'      => [
                    'config',
                    'migrations',
                    'orchid-stubs',
                ], ])
            ->executeCommand('vendor:publish', [
                '--provider' => PressServiceProvider::class,
                '--force'    => true,
                '--tag'      => [
                    'config',
                    'migrations',
                ], ])
            ->executeCommand('migrate')
            ->executeCommand('storage:link');

        $this->changeUserModel();
        $this->progressBar->finish();
        $this->info(' Completed!');

        $this
            ->setValueEnv('SCOUT_DRIVER')
            ->comment("To create a user, run 'artisan orchid:admin'");

        $this->line("To start the embedded server, run 'artisan serve'");

        event(new InstallEvent($this));
    }
1260031
public function handle()
    {
        parent::handle();

        $modelGenerator = new ModelGenerator($this->commandData);
        $modelGenerator->generate();

        $this->performPostActions();
    }
952552
protected function doExecute()
	{
		$args = $this->input->args;

		$command = $this->getDescribedCommand($args);

		if (!$command->getApplication())
		{
			$command->setApplication($this->application);
		}

		$descriptor = $this->getDescriptor();

		/** @var $command Command */
		$rendered = $descriptor->describe($command);

		$this->out($rendered);

		return;
	}
370255
public function handle()
    {
        if (!in_array($this->argument('type'), [
            CommandData::$COMMAND_TYPE_API,
            CommandData::$COMMAND_TYPE_SCAFFOLD,
            CommandData::$COMMAND_TYPE_API_SCAFFOLD,
        ])) {
            $this->error('invalid rollback type');
        }

        $this->commandData = new CommandData($this, $this->argument('type'));
        $this->commandData->config->mName = $this->commandData->modelName = $this->argument('model');

        $this->commandData->config->prepareOptions($this->commandData, ['tableName', 'prefix']);
        $this->commandData->config->prepareAddOns();
        $this->commandData->config->prepareModelNames();
        $this->commandData->config->prepareTableName();
        $this->commandData->config->loadPaths();
        $this->commandData->config->loadNamespaces($this->commandData);
        $this->commandData = $this->commandData->config->loadDynamicVariables($this->commandData);

        $migrationGenerator = new MigrationGenerator($this->commandData);
        $migrationGenerator->rollback();

        $modelGenerator = new ModelGenerator($this->commandData);
        $modelGenerator->rollback();

        $repositoryGenerator = new RepositoryGenerator($this->commandData);
        $repositoryGenerator->rollback();

        $requestGenerator = new APIRequestGenerator($this->commandData);
        $requestGenerator->rollback();

        $controllerGenerator = new APIControllerGenerator($this->commandData);
        $controllerGenerator->rollback();

        $routesGenerator = new APIRoutesGenerator($this->commandData);
        $routesGenerator->rollback();

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

        $controllerGenerator = new ControllerGenerator($this->commandData);
        $controllerGenerator->rollback();

        $viewGenerator = new ViewGenerator($this->commandData);
        $viewGenerator->rollback();

        $routeGenerator = new RoutesGenerator($this->commandData);
        $routeGenerator->rollback();

        if ($this->commandData->getAddOn('tests')) {
            $repositoryTestGenerator = new RepositoryTestGenerator($this->commandData);
            $repositoryTestGenerator->rollback();

            $testTraitGenerator = new TestTraitGenerator($this->commandData);
            $testTraitGenerator->rollback();

            $apiTestGenerator = new APITestGenerator($this->commandData);
            $apiTestGenerator->rollback();
        }

        if ($this->commandData->config->getAddOn('menu.enabled')) {
            $menuGenerator = new MenuGenerator($this->commandData);
            $menuGenerator->rollback();
        }

        $this->info('Generating autoload files');
        $this->composer->dumpOptimized();
    }
1173658
public function fire(Command $command)
    {
        $this->command = $command;

        $connected = false;

        while (! $connected) {
            $host = $this->askDatabaseHost();

            $name = $this->askDatabaseName();

            $user = $this->askDatabaseUsername();

            $password = $this->askDatabasePassword();

            $this->setLaravelConfiguration($name, $user, $password, $host);

            if ($this->databaseConnectionIsValid()) {
                $connected = true;
            } else {
                $command->error('Please ensure your database credentials are valid.');
            }
        }

        $this->env->write($name, $user, $password, $host);

        $command->info('Database successfully configured');
    }
1295183
public function execute(): void
    {
        $this->generator->setNamespace($this->getNamespace());
        $this->parseWsdl();
        $this->generateStructures();
        $this->generateRequests();
        $this->generateResponses();
        $this->generateMethods();
        $this->generateService();
        $this->generateClient();
        $this->generateClassMap();
        ;
    }
857746
public function fire()
    {
        $packageName = $this->argument('packageName');
        $version = $this->argument('version');
        $version = unserialize(base64_decode($version));
        $this->postProcess($packageName, $version);
    }
215655
public function handle()
    {
        if (!in_array($this->argument('type'), [
            CommandData::$COMMAND_TYPE_API,
            CommandData::$COMMAND_TYPE_SCAFFOLD,
            CommandData::$COMMAND_TYPE_API_SCAFFOLD,
            CommandData::$COMMAND_TYPE_VUEJS,
        ])) {
            $this->error('invalid rollback type');
        }

        $this->commandData = new CommandData($this, $this->argument('type'));
        $this->commandData->config->mName = $this->commandData->modelName = $this->argument('model');

        $this->commandData->config->init($this->commandData, ['tableName', 'prefix']);

        $migrationGenerator = new MigrationGenerator($this->commandData);
        $migrationGenerator->rollback();

        $modelGenerator = new ModelGenerator($this->commandData);
        $modelGenerator->rollback();

        $repositoryGenerator = new RepositoryGenerator($this->commandData);
        $repositoryGenerator->rollback();

        $requestGenerator = new APIRequestGenerator($this->commandData);
        $requestGenerator->rollback();

        $controllerGenerator = new APIControllerGenerator($this->commandData);
        $controllerGenerator->rollback();

        $routesGenerator = new APIRoutesGenerator($this->commandData);
        $routesGenerator->rollback();

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

        $controllerGenerator = new ControllerGenerator($this->commandData);
        $controllerGenerator->rollback();

        $viewGenerator = new ViewGenerator($this->commandData);
        $viewGenerator->rollback();

        $routeGenerator = new RoutesGenerator($this->commandData);
        $routeGenerator->rollback();

        $controllerGenerator = new VueJsControllerGenerator($this->commandData);
        $controllerGenerator->rollback();

        $routesGenerator = new VueJsRoutesGenerator($this->commandData);
        $routesGenerator->rollback();

        $viewGenerator = new VueJsViewGenerator($this->commandData);
        $viewGenerator->rollback();

        $modelJsConfigGenerator = new ModelJsConfigGenerator($this->commandData);
        $modelJsConfigGenerator->rollback();

        if ($this->commandData->getAddOn('tests')) {
            $repositoryTestGenerator = new RepositoryTestGenerator($this->commandData);
            $repositoryTestGenerator->rollback();

            $testTraitGenerator = new TestTraitGenerator($this->commandData);
            $testTraitGenerator->rollback();

            $apiTestGenerator = new APITestGenerator($this->commandData);
            $apiTestGenerator->rollback();
        }

        if ($this->commandData->config->getAddOn('menu.enabled')) {
            $menuGenerator = new MenuGenerator($this->commandData);
            $menuGenerator->rollback();
        }

        $this->info('Generating autoload files');
        $this->composer->dumpOptimized();
    }
1002248
public function fire()
    {
        $this->info('CheeModule Commands:');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:create         | Create a new module for development | eg: php artisan CheeModule:create name=moduleName         |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:buildAssets    | Move assets directory to public     | eg: php artisan CheeModule:buildAssets name=moduleName    |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:installEvent   | Run install event for a module      | eg: php artisan CheeModule:installEvent name=moduleName   |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:uninstallEvent | Run uninstall event for a module    | eg: php artisan CheeModule:uninstallEvent name=moduleName |');
        $this->info('-----------------------------------------------------------------------------------------------------------------------------');
        $this->info('');
    }
273099
public function execute()
    {
        $queue = $this->container->getDelayedExecutionTaskQueue();
        if($queue->length() == 0){
            return;
        }
        ignore_user_abort(true);
        $queue->execute();
    }
648787
public function handle()
    {
        $commands = config('deploy.commands.purge_old_releases.after');
        foreach($commands as $command){
            $output = $this->scriptParser->parseString(
                $command, [
                'base_path' => base_path(),
                'env' => $this->option('env')
                ]
            )->run($this);

            if(!$output) {
                return false;
            }
        }
    }
853505
public function fire()
    {
        $this->app = $this->getLaravel();
        $this->config = $this->app->make('config');

        $options = $this->processOptions();
        $options['extensions'] = 'php';
        $options['colors'] = $this->getOutput()->isDecorated();

        $command = $this->buildCommand($this->binPath . '/phpcs', $options);

        $this->info('Running PHP Code Sniffer...');
        $this->info($command);

        passthru($command, $exitCode);

        $this->info('Done.');

        if (!$this->option('no-interaction') && $exitCode !== 0) {
            $answer = $this->ask('Try to automatically fix issues? [Yn]', 'y');

            if (strtolower($answer) == 'n') {
                $this->info('Declined fixes.');

                return $exitCode;
            }

            // Code beautifier takes all the same options (except for colors).
            unset($options['colors']);

            $command = $this->buildCommand($this->binPath . '/phpcbf', $options);

            $this->info('Running PHP Code Beautifier...');
            $this->info($command);

            passthru($command, $exitCode);

            $this->info('Done.');
        }

        return $exitCode;
    }
1280223
public function handle()
    {
        $this->abortCommandExecution();
        $this->assignments = $this->fetchAssignments();

        $headers = ['Id', 'Name','Repository','Repo Type','Forge site','Forge Server','Created','Updated'];

        $rows = [];
        foreach ($this->assignments as $assignment) {
            $rows[] = [
                $assignment->id,
                $assignment->name,
                $assignment->repository_uri,
                $assignment->repository_type,
                $assignment->forge_site,
                $assignment->forge_server,
                $assignment->created_at,
                $assignment->updated_at
            ];
        }

        $this->table($headers, $rows);
    }
104168
public function handle()
    {
        parent::handle();

        $repositoryGenerator = new RepositoryGenerator($this->commandData);
        $repositoryGenerator->generate();

        $this->performPostActions();
    }
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');
    }