Execute the job.

@return void
@throws \Exception
@throws \Throwable
343392
public function handle()
    {

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

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

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

        collect($implants)->each(function ($implant) {

            CharacterImplant::firstOrCreate([
                'character_id' => $this->getCharacterId(),
                'type_id'      => $implant,
            ]);
        });

        CharacterImplant::where('character_id', $this->getCharacterId())
            ->whereNotIn('type_id', collect($implants)->flatten()->all())
            ->delete();
    }
59415
public function handle()
    {
        $data = [
            'value'      => $this->argument('ip'),
            'enabled'    => !$this->option('disabled'),
            'trusted'    => $this->option('trusted'),
            'reason'     => $this->option('reason'),
            'expired_at' => $this->option('expire'),
        ];

        $this->rulesProcessor->store($this, $data, $this->option('canBanSelf'));
    }
1328179
public function handle()
    {
        $group = $this->argument('group');
        $json = $this->option('json');

        if (is_null($group) && !$json) {
            $this->warn('You must either specify a group argument or export as --json');

            return;
        }

        if (!is_null($group) && $json) {
            $this->warn('You cannot use both group argument and --json option at the same time');

            return;
        }

        $this->manager->exportTranslations($group, $json);

        if (!is_null($group)) {
            $this->info('Done writing language files for '.(($group == '*') ? 'ALL groups' : $group.' group'));
        } elseif ($json) {
            $this->info('Done writing JSON language files for translation strings');
        }
    }
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()
        );
    }
51455
public function execute()
    {
        $this->triggerBeforeCreationEvent();
        $operation = $this->getAddOperation()->setServer($this->server);
        $this->connection->execute($operation);
        $this->triggerAfterCreationEvent($operation);
    }
414476
public function process(): void
    {
        try {
            $this->queue = msg_get_queue(ftok(__FILE__, 't'));
            $this->catchSignal();
            $this->initWorkerManager();
            $this->main();
        } catch (\Exception $e) {
            $this->logger->error('main() throw an exception, cleanup and exit', [
                'class' => get_class($this),
                'exception' => $e,
            ]);

            $this->cleanup(SIGTERM);
        }
    }
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,
        ]);
    }
1169451
public function handle()
    {
        if (parent::handle() === false && ! $this->option('force')) {
            return;
        }

        if ($this->option('all')) {
            $this->input->setOption('controller', true);
            $this->input->setOption('factory', true);
            $this->input->setOption('migration', true);
            $this->input->setOption('resource', true);
        }

        if ($this->option('factory')) {
            $this->createFactory();
        }

        if ($this->option('migration')) {
            $this->createMigration();
        }

        if ($this->option('controller') || $this->option('resource')) {
            $this->createController();
        }
    }
27410
public function execute()
    {
        $this->boot();

        $this->registerRootCommand();

        $this->registerCommands();

        $this->prepareExecute();

        $this->triggerEvent('onBeforeExecute', ['app' => $this]);

        // Perform application routines.
        $exitCode = $this->doExecute();

        $this->triggerEvent('onAfterExecute', ['app' => $this]);

        exit($this->postExecute($exitCode));
    }
224900
public function handle()
    {
        $requestLogger = app(ResponseLogger::class);
        $requestLogger->log($this->request, $this->response);
    }
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());
    }
378860
public function handle()
    {
        $rule = $this->option('rule');
        /**
         * @var Cdn $cdn
         */
        $cdn = app()->makeWith(Cdn::class, ['rule' => $rule]);
        $cdn->clearCdn($this->output);
    }
396305
public function handle()
    {
        $this->compile = $this->option( 'compile' );
        $this->contract = app( RegisterBlueprint::class );
        $region = $this->askWhichRegionElementIsFor();
        $layoutClassName = $this->askWhichLayoutToCreate();

        try {
            $region = self::getClassDetails( $region );
        } catch( \Exception $e ) {
            $this->error( "{$region->fileName} does not exist" );
            exit;
        }

        if( ! method_exists( $layoutClassName, 'generate' ) ) {
            $this->error( "Layout {$layoutClassName} does not provide generation support, exiting..." );
            exit;
        }

        $layoutClassName::generate( $region, $this );

        if( $this->compile ) {
            $this->info( exec( "php artisan laraview:compile" ) );
        }
    }
848963
public function handle()
    {

        $connection = $this->option("connection") ? $this->option("connection") : config("es.default");

        $indices = $this->es->connection($connection)->raw()->cat()->indices();

        if (is_array($indices)) {
            $indices = $this->getIndicesFromArrayResponse($indices);
        } else {
            $indices = $this->getIndicesFromStringResponse($indices);
        }

        if (count($indices)) {
            $this->table($this->headers, $indices);
        } else {
            $this->warn('No indices found.');
        }

    }
951953
public function handle()
    {
        $exception = $this->getException();

        Log::logger('ErrorHandler')->error($exception->getMessage(), [
            'exception' => get_class($exception),
            'file' => sprintf(
                "%s on line %d",
                $exception->getFile(),
                $exception->getLine()
            )
        ]);

        $template = new Template();

        $template = $template->initialize();
        $view = 'errors/500.html.twig';
        $code = 500;
        if (
            ($exception instanceof ControllerNotFoundException) ||
            ($exception instanceof ActionNotFoundException)
        ) {
            $view = 'errors/404.html.twig';
            $code = 404;
        }

        $data = ['exception' => $exception];
        $html = $template->parse($view)
            ->process($data);

        $this->app->response->setStatusCode($code)
            ->setContent($html);

        $this->app->response->send();
    }
476826
public function handle() {
        $actions = func_get_args();

        if ($actions === array('*') || empty($actions)) {
            $this->_handled = array('*');
        } else {
            $this->_handled = array_unique(array_intersect($actions, get_class_methods($this->controller)));
        }
    }
630812
public function handle()
    {
        try {
            $role = App::make(config('commands.role'));

            $role::create([
                'name' => $this->ask('Name?')
            ]);
            $this->info('Role created');
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }
    }