Execute the command.

@return void
163701
public function fire()
    {
        try {
            (new ValidatorGenerator([
                'name' => $this->argument('name'),
                'rules' => $this->option('rules'),
                'force' => $this->option('force'),
            ]))->run();
            $this->info("Validator created successfully.");
        } catch (FileAlreadyExistsException $e) {
            $this->error($this->type . ' already exists!');

            return false;
        }
    }
1260031
public function handle()
    {
        parent::handle();

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

        $this->performPostActions();
    }
177515
public function handle()
    {

        if (! $this->preflighted()) return;

        $killmails = $this->retrieve([
            'character_id' => $this->getCharacterId(),
        ]);

        if ($killmails->isCachedLoad()) return;

        collect($killmails)->each(function ($killmail) {

            CharacterKillmail::firstOrCreate([
                'character_id'  => $this->getCharacterId(),
                'killmail_id'   => $killmail->killmail_id,
            ], [
                'killmail_hash' => $killmail->killmail_hash,
            ]);
        });
    }
1143649
public function handle()
    {
        try {
            $this->filesystem->make(
                $path = resource_path('views/' . $this->viewPath()),
                $this->filesystem->get($this->getStubPath()),
                true
            );
            $this->info('File ' . $path . ' created');
        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
    }
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;
        }
    }
600948
public function handle()
    {
        $this->loadConfiguration();

        foreach ( $this->configurationData as $serviceData ) {
            $this->createdFiles = [];
            $this->createService($serviceData);
            $this->finalizeFile($serviceData->file);
        }

        $this->call('hc:routes');
        $this->call('hc:forms');
        $this->call('hc:admin-menu');
    }
576974
public function handle()
    {
        // Retrieve attributes
        $attributes = config('commands.user_attributes');

        // Retrieve sensitive fields
        $sensitive_attributes = config('commands.user_attributes_sensitive');

        // Ask questions and prepare data
        foreach ($attributes as $attribute => $question) {
            if (is_null($attribute) || $attribute === 0) {
                $attribute = $question;
            }

            // Check if sensitive field
            if (in_array($attribute, $sensitive_attributes)) {
                $attributes[$attribute] = Hash::make($this->secret($question));
                continue;
            }

            $attributes[$attribute] = $this->ask($question);
        }

        // Create new user
        try {
            $user = App::make(config('commands.user'));
            $user::create($attributes);
            $this->info('User created');
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }
    }
554673
public function handle()
    {
        $this->abortCommandExecution();

        $this->assignment = $this->argument('assignment') ? $this->argument('assignment') : $this->askAssignment();
        $this->assignmentName = $this->argument('name') ? $this->argument('name') : $this->askName();
        $this->repository_uri = $this->argument('repository_uri') ? $this->argument('repository_uri') : $this->askRepositoryUri();
        $this->repository_type = $this->argument('repository_type') ? $this->argument('repository_type') : $this->askRepositoryType();
        $this->forge_site = $this->argument('forge_site') ? $this->argument('forge_site') : $this->askForgeSite();
        $this->forge_server = $this->argument('forge_server') ? $this->argument('forge_server') : $this->askForgeServer();

        $this->updateAssignment();
    }
838478
public function handle()
    {

        // $this->info($this->option('language'));

        $locales = Config::get('app.locales');

        if($this->option('file') != null)
        {
            $file = base_path('resources/lang/en/'.$this->option('file'));

            foreach ($locales as $localeKey => $value) 
            {
                if($localeKey != 'en')
                {
                   $this->translate($localeKey,$file);
                }
            }   
        }
        else
        {
            $files = File::allFiles(base_path('resources/lang/en'));
            foreach ($files as $file)
            {   
                if($this->option('language') != null)
                {
                    $this->translate($this->option('language'),$file);
                }
                else
                {
                    foreach ($locales as $localeKey => $value) 
                    {
                        if($localeKey != 'en')
                        {
                           $this->translate($localeKey,$file);
                        }
                    
                    }    
                }
            }
        }
        
    }
1120339
public function handle()
    {
        $name = $this->argument('name');

        $error = $this->validateName($name);

        if ($error) {
            $this->error($error);
            return;
        }

        $key = ApiKey::where('name', $name)->first();

        if ($key->active) {
            $this->info('Key "' . $name . '" is already active');
            return;
        }

        $key->active = 1;
        $key->save();

        $this->info('Activated key: ' . $name);
    }
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;
            }
        }
    }
176078
public function handle()
    {
        $this->createEnv();

        $this->getDatabaseInformation();
        /**
         * Migrate tables
         */
        $this->line('Migrate database...');
        $this->app->register(InstallModuleServiceProvider::class);

        $this->line('Create super admin role...');
        $this->createSuperAdminRole();
        $this->line('Create admin user...');
        $this->createAdminUser();
        $this->line('Install module dependencies...');
        $this->registerInstallModuleService();

        session()->flush();
        session()->regenerate();
        \Artisan::call('cache:clear');
        \Artisan::call('view:clear');

        $this->info("\nWebEd installed. Current version is " . get_cms_version());
    }
388784
public function handle()
    {
        // Load Data
        $stats   = $this->logViewer->statsTable('en');

        $rows    = $stats->rows();
        $rows[]  = $this->tableSeparator();
        $rows[]  = $this->prepareFooter($stats);

        // Display Data
        $this->displayLogViewer();
        $this->table($stats->header(), $rows);
    }
326173
public function handle()
    {
        $this->abortCommandExecution();
        $this->remotePath = $this->domain . '/.env';
        $this->runScp($this->localPath, $this->remotePath, null, true);
    }
913390
public function handle()
    {
        $server = $this->laravel->make('server');

        $this->line("{$this->laravel->name()} server is starting...");

        $this->processRuntime($server);

        $server->start();
    }
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();
    }
1040327
public function handle()
    {

        $this->setConfig();

        $this->checkRequirements();

        if ( $this->InsertChartIntoFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

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


    }