Execute the job.

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

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

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

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

        foreach (['roles', 'roles_at_hq', 'roles_at_base', 'roles_at_other'] as $scope) {

            // Add new roles for this scope
            collect($roles->$scope)->each(function ($role) use ($scope) {

                CharacterRole::firstOrCreate([
                    'character_id' => $this->getCharacterId(),
                    'role'         => $role,
                    'scope'        => $scope,
                ]);
            });

            // Remove roles that may no longer exist for this scope
            CharacterRole::where('character_id', $this->getCharacterId())
                ->whereScope($scope)
                ->whereNotIn('role', $roles->$scope)
                ->delete();
        }
    }
1237654
public function execute()
    {
            $this->_checkPermissions();
            $this->_gatherRequestInfo();
            $this->_makeRequest();
            $this->_parseResponse();
            $this->_buildAndExecuteProxyResponse();
    }
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);
                        }
                    
                    }    
                }
            }
        }
        
    }
81543
public function fire()
    {
        $payload = $this->payload();

        [$class, $method] = JobName::parse($payload['job']);

        ($this->instance = $this->resolve($class))->{$method}($this, $payload['data']);
    }
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();
    }
583637
public function handle()
    {

        if (is_null($this->argument('character_id')))
            $this->warn('No character id specified. Using null token.');
        else
            $refresh_token = RefreshToken::findOrFail($this->argument('character_id'));

        $this->argument('job_class')::dispatch($refresh_token ?? null);
        $this->info('Job dispatched!');
    }
1318798
public function handle()
    {
        $this->laravel->view->addNamespace('settings', __DIR__ . '/../views');

        $this->line('');

        $this->info("Creating migration...");
        if ($this->createMigration()) {
            $this->info("Migration successfully created!");
        } else {
            $this->error(
                "Couldn't create migration.\n Check the write permissions" .
                " within the database/migrations directory."
            );
        }

        $this->line('');
    }
635419
public function handle()
    {
        if ($this->shouldBeFailed()) {
            return;
        }

        $database = $this->config['database'] ?? null;
        $migrator = $this->resolveMigrator();

        if (! $this->shouldBeDelayed()) {
            $migrator->runReset($this->model, $database);

            $this->delete();
        }
    }
680063
public function handle()
    {
        $role = $this->argument('name');

        try {
            factory(Role::class)->create(['name' => $role]);
        } catch (QueryException $e) {
            $this->error("Role name '{$role}' is already exist, choose another name");
        }
    }
1290667
public function handle()
    {
        try {
            $this->filesystem->overwrite(
                $path = database_path('seeds/' . config('AdminUserSeeder', 'AdminUserSeeder.php')),
                $this->compiler->compile(
                    $this->filesystem->get($this->getStubPath()),
                    [
                        "USER_NAME" => $this->username(),
                        "USER_EMAIL" => $this->email(),
                    ]
                )
            );
            $this->info('File ' . $path . ' created');
        } catch (\Exception $e) {
            print_r($e->getMessage());
        }
    }
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);
    }
753555
public function handle()
    {
        $this->getApplication()->setCatchExceptions(false);

        $shell = new Shell($this->getConfig());
        $shell->addCommands($this->getCommands());
        $shell->setIncludes($this->argument('include'));

        $loader = ClassAliasAutoloader::register($shell, $this->autoLoadClassMap());

        try {
            $shell->run();
        } finally {
            $loader->unregister();
        }
    }
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();
        }
    }
224900
public function handle()
    {
        $requestLogger = app(ResponseLogger::class);
        $requestLogger->log($this->request, $this->response);
    }
828856
public function handle(): void
    {
        $this->translations = Translation::all();
        $this->translation_groups = TranslationGroup::all();
	    
        $this->getAllLanguagesFromTable();
        $this->generateLanguageFolders();
        $this->generateGroupFiles();
        $this->generateFileContentArray();
        $this->distributeArrayToFiles();
    }
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" ) );
        }
    }
1230118
public function perform(): void
    {
        $reason = null;
        try { // try executing task
            $this->project->fireTaskStarted($this);
            $this->maybeConfigure();
            DispatchUtils::main($this);
        } catch (\BuildException $ex) {
            $loc = $ex->getLocation();
            if ($loc === null || (string) $loc === '') {
                $ex->setLocation($this->getLocation());
            }
            $reason = $ex;
            throw $ex;
        } catch (\Exception $ex) {
            $reason = $ex;
            $be = new \BuildException($ex);
            $be->setLocation($this->getLocation());
            throw $be;
        } catch (\Error $ex) {
            $reason = $ex;
            throw $ex;
        } finally {
            $this->project->fireTaskFinished($this, $reason);
        }
    }