Execute the console command.

@return null
177747
public function handle()
    {
        $this->module = strtolower($this->argument('module'));
        if (!is_dir(base_path('vendor/typicms/'.$this->module))) {
            throw new Exception('Module “'.$this->module.'” not found in vendor directory.');
        }
        $provider = 'TypiCMS\Modules\\'.ucfirst($this->module).'\Providers\ModuleProvider';
        if (class_exists($provider)) {
            $this->call('vendor:publish', ['--provider' => $provider]);
            $this->publishModule();
            $this->moveMigrationFiles();
            $this->uninstallFromComposer();
        } else {
            throw new Exception($provider.' not found, did you add it to config/app.php?');
        }
    }
1354288
public function handle()
    {
        $group = $this->input->getArgument('group');

        if (is_null($group)) {
            return $this->publish();
        }

        $groups = explode(',', $group);

        foreach($groups as $group) {
            $this->publish($group);
        }
    }
426883
public function handle()
    {
        $this->call('module:migrate-reset', [
            'module' => $this->getModuleName(),
            '--database' => $this->option('database'),
            '--force' => $this->option('force'),
        ]);

        $this->call('module:migrate', [
            'module' => $this->getModuleName(),
            '--database' => $this->option('database'),
            '--force' => $this->option('force'),
        ]);

        if ($this->option('seed')) {
            $this->call('module:seed', [
                'module' => $this->getModuleName(),
            ]);
        }
    }
53484
public function handle()
    {
        if ($package = $this->option('package')) {
            $this->manager->setPathToVendorPackage($package);
        }

        $this->files = $this->manager->files();

        if (empty($this->files)) {
            $this->warn('No language files were found!');
        }

        $languages = $this->manager->languages();

        $this->table(
            array_merge(['key'], $languages),
            $this->tableRows()
        );
    }
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();
    }
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());
        }
    }
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')
        );
    }
1339202
public function handle()
    {
        $input = $this->collectInput();

        try {
            $this->validateInput($input);

            $this->registerUser($input);

            $this->sendResetPasswordLink($input);
        } catch (ValidationException $e) {
            $this->error(PHP_EOL . implode(PHP_EOL, $e->errors()->all()) . PHP_EOL);
        }
    }
1040327
public function handle()
    {

        $this->setConfig();

        $this->checkRequirements();

        if ( $this->InsertChartIntoFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

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


    }
1244023
public function handle()
    {

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

        $this->entity_ids = collect();

        $this->entity_ids->push(CharacterWalletJournal::select('first_party_id')
            ->whereNotIn('first_party_id', UniverseName::select('entity_id')->distinct()->get())
            ->whereNotNull('first_party_id')
            ->distinct()
            ->get()
            ->pluck('first_party_id')
            ->toArray());

        $this->entity_ids->push(CharacterWalletJournal::select('second_party_id')
            ->whereNotIn('second_party_id', UniverseName::select('entity_id')->distinct()->get())
            ->whereNotNull('second_party_id')
            ->distinct()
            ->get()
            ->pluck('second_party_id')
            ->toArray());

        $this->entity_ids->flatten()->chunk($this->items_id_limit)->each(function ($chunk) {

            $this->request_body = collect($chunk->values()->all())->unique()->values()->all();

            $resolutions = $this->retrieve();

            collect($resolutions)->each(function ($resolution) {

                UniverseName::firstOrNew([
                    'entity_id' => $resolution->id,
                ])->fill([
                    'name'     => $resolution->name,
                    'category' => $resolution->category,
                ])->save();

            });

        });
    }
725688
public function handle()
    {
        $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]);
        $this->call('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client']);
        $this->call('passport:client', ['--password' => true, '--name' => config('app.name').' Password Grant Client']);
    }
552990
public function handle()
    {
        set_time_limit(900);

        $this->clearCaches();

        if($this->isInstalled()) {
            return false;
        }

        if(!$this->requirements->check($this)) {
            return false;
        }

        $this
            ->welcomeMessage()
            ->setBar()
            ->askInstallingQuestions()
            ->renameEnvFile()
            ->setEnvValues()
            ->saveConfiguration()
            ->generateKey()
            ->deleteUploads()
            ->runMigration()
            ->createDummyContent()
            ->createDefaultTheme()
            ->successfullyInstalled();
        return;
    }
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());
    }
363896
public function handle()
    {
        $checkBacktrace = $this->getBacktraceUse();
        if (!is_null($checkBacktrace)) {
            $model = $checkBacktrace['object']->withTrashed()->get([$checkBacktrace['object']->getModel()->getKeyName()]);
            (new QueryBuilderSoftCascade())->cascade($model, $checkBacktrace['function'], $checkBacktrace['args']);
        }
    }
1263052
public function fire()
    {
        $this->setLogReaderParam();

        $logs = $this->getLogEntries();

        foreach ($logs as $logEntry) {
            $this->line("----------------------------------------------");
            $this->line(">>> Entry ID: ".$logEntry->id);
            $this->line("[-] In file: ".$logEntry->file_path);
            $this->line("[-] Date: ".$logEntry->date);
            $this->line("[-] Environment: ".$logEntry->environment);
            $this->line("[-] Level: ".$logEntry->level."\r\n");

            $this->line(">>> Message:");
            $this->line($logEntry->context->message."\r\n");

            $this->line(">>> More informations:");
            $this->line("[-] Exception: ".$logEntry->context->exception);
            $this->line("[-] Caught in: ".$logEntry->context->in.((!empty($logEntry->context->line)) ? ' (line '.$logEntry->context->line.')' : null)."\r\n");
        }
    }
850465
public function handle()
	{
		$connection = $this->argument('connection') ?: $this->config->get('queue.default');
		$queue = $this->argument('queue') ?: $this->config->get('queue.connections.' . $connection  . '.queue');

		$this->info(sprintf('Clearing queue "%s" on "%s"', $queue, $connection));
		$cleared = $this->clearer->clear($connection, $queue);
		$this->info(sprintf('Cleared %d jobs', $cleared));
	}
939067
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $this->call('mapping:reset', [
            '--database' => $this->option('database'),
            '--force'    => true,
        ]);

        $this->call('mapping:run', [
            '--index'    => $this->option('index'),
            '--database' => $this->option('database'),
            '--force'    => true,
        ]);
    }