handle the request

@return Response
336806
public function handler(): Response
    {
        $data = $this->validate([
            'email' => [
                new NotBlank(),
                new Email()
            ]
        ]);
        $member = Member::findBy($data);
        if ($member) {
            $this->log('info', '[' . $data['email'] . '] get password reset token');
            $token = (new PasswordResetToken())
                ->member($member)
                ->save();
            app()->dispatch(new VerifyTokenNeedsToBeSent($member, $token->getId()));
        } else {
            $this->log('info', '[' . $data['email'] . '] failed to get password reset token');
            sleep(mt_rand(1, 3)); // avoid judging status through time used
        }
        return response();
    }
1201638
public function handle()
    {
        $themeManager = ThemeManager::instance();
        $themeName = $this->argument('name');
        $themeExists = Theme::exists($themeName);

        if (!$themeExists) {
            $themeName = strtolower(str_replace('.', '-', $themeName));
            $themeExists = Theme::exists($themeName);
        }

        if (!$themeExists) {
            return $this->error(sprintf('The theme %s does not exist.', $themeName));
        }

        if (!$this->confirmToProceed(sprintf('This will DELETE theme "%s" from the filesystem and database.', $themeName))) {
            return;
        }

        try {
            $themeManager->deleteTheme($themeName);

            $this->info(sprintf('The theme %s has been deleted.', $themeName));
        }
        catch (Exception $ex) {
            $this->error($ex->getMessage());
        }
    }
1290083
protected function _handle()
    {
        $ids = $this->_processIds();
        $subject = $this->_constructSubject($ids);

        $event = $this->_trigger('beforeBulk', $subject);
        if ($event->isStopped()) {
            return $this->_stopped($subject);
        }

        if ($this->_bulk($subject->query)) {
            $this->_success($subject);
        } else {
            $this->_error($subject);
        }

        return $this->_redirect($subject, ['action' => 'index']);
    }
833004
protected function handle() {
        if ($this->wsdlmode) {
            // Prepare the response.
            $this->response = $this->wsdl->to_xml();

            // Send the results back in correct format.
            $this->send_response();
        } else {
            $wsdlurl = clone($this->serverurl);
            $wsdlurl->param('wsdl', 1);

            $options = array(
                'uri' => $this->serverurl->out(false)
            );
            // Initialise the SOAP server.
            $this->soapserver = new SoapServer($wsdlurl->out(false), $options);
            if (!empty($this->serviceclass)) {
                $this->soapserver->setClass($this->serviceclass);
                // Get all the methods for the generated service class then register to the SOAP server.
                $functions = get_class_methods($this->serviceclass);
                $this->soapserver->addFunction($functions);
            }

            // Get soap request from raw POST data.
            $soaprequest = file_get_contents('php://input');
            // Handle the request.
            try {
                $this->soapserver->handle($soaprequest);
            } catch (Exception $e) {
                $this->fault($e);
            }
        }
    }
1302269
public function handle()
    {
        $response = $this->http->post('https://graph.facebook.com/v2.8/me/nlp_configs?access_token='.config('botman.facebook.token'),
            [], ['nlp_enabled' => ! $this->option('disable')]);

        $responseObject = json_decode($response->getContent());

        if ($response->getStatusCode() == 200) {
            if ($this->option('disable')) {
                $this->info('NLP was disabled.');
            } else {
                $this->info('NLP was enabled.');
            }
        } else {
            $this->error('Something went wrong: '.$responseObject->error->message);
        }
    }
209746
public function handle()
    {
        // Make sure we have everything we need from the form.
        $this->validate(request(), $this->rules());

        // Try to update the user's password.
        return $this->forgotPassword
            ->updatePassword(request('token'), request('email'), request('password'))
            ->redirect();
    }
275979
public function handle()
    {
        // get information about the REST-request
        $this->get();

        if ($this->requestMethod === 'GET' && $this->typo3Cache->hasCacheEntry($this->url, $_GET)) {
            return $this->handleRequestByTypo3Cache();
        }

        // if no cache exist: restler should handle the request
        if (Defaults::$useVendorMIMEVersioning) {
            $this->responseFormat = $this->negotiateResponseFormat();
        }
        $this->route();
        $this->negotiate();
        $this->preAuthFilter();
        $this->authenticate();
        $this->postAuthFilter();
        $this->validate();
        $this->preCall();
        $this->call();
        $this->compose();
        $this->postCall();

        if ($this->responseFormat instanceof JsonFormat) {
            // return stdClass-object (instead of an array)
            return $this->getRestApiJsonFormat()->decode($this->responseData);
        }
        return $this->responseFormat->decode($this->responseData);
    }
927314
public function handle()
    {
        $this->resource = $this->getResourceOnly();
        $this->settings = config('generators.defaults');

        $this->callModel();
        $this->callView();
        $this->callRepository();
        $this->callController();
        $this->callMigration();
        $this->callSeed();
        $this->callMigrate();

        // confirm dump autoload
        if ($this->confirm("Run 'composer dump-autoload'?")) {
            $this->composer->dumpAutoloads();
        }

        $this->info('All Done!');
        $this->info('Remember to add ' . "`Route::resource('" . str_replace('_', '-',
                $this->getCollectionName()) . "', '" . $this->getResourceControllerName() . "');`" . ' in `routes\\web.php`');
    }
399435
public function handle()
	{
		$this->log();
		
		// when not in development we respond using a route
		if ( !ClanCats::in_development() && !ClanCats::is_cli() )
		{
			CCResponse::error(500)->send( true );
		}
		// when in development continue with the default responder
		else
		{
			$this->respond();
		}
	}
1278498
public function handle()
    {
        $themeName = $this->argument('name');
        $argDirName = $this->argument('dirName');

        if ($argDirName && $themeName == $argDirName) {
            $argDirName = null;
        }

        if ($argDirName) {
            if (!preg_match('/^[a-z0-9\_\-]+$/i', $argDirName)) {
                return $this->error('Invalid destination directory name.');
            }

            if (Theme::exists($argDirName)) {
                return $this->error(sprintf('A theme named %s already exists.', $argDirName));
            }
        }

        try {
            $themeManager = ThemeManager::instance();
            $updateManager = UpdateManager::instance();

            $themeDetails = $updateManager->requestThemeDetails($themeName);

            if ($themeManager->isInstalled($themeDetails['code'])) {
                return $this->error(sprintf('The theme %s is already installed.', $themeDetails['code']));
            }

            if (Theme::exists($themeDetails['code'])) {
                return $this->error(sprintf('A theme named %s already exists.', $themeDetails['code']));
            }

            $fields = ['Name', 'Description', 'Author', 'URL', ''];

            $this->info(sprintf(
                implode(': %s'.PHP_EOL, $fields),
                $themeDetails['code'],
                $themeDetails['description'],
                $themeDetails['author'],
                $themeDetails['product_url']
            ));

            if (!$this->confirm('Do you wish to continue? [Y|n]', true)) {
                return;
            }

            $this->info('Downloading theme...');
            $updateManager->downloadTheme($themeDetails['code'], $themeDetails['hash']);

            $this->info('Extracting theme...');
            $updateManager->extractTheme($themeDetails['code'], $themeDetails['hash']);

            $dirName = $this->themeCodeToDir($themeDetails['code']);

            if ($argDirName) {
                /*
                 * Move downloaded theme to a new directory.
                 * Basically we're renaming it.
                 */
                File::move(themes_path().'/'.$dirName, themes_path().'/'.$argDirName);

                /*
                 * Let's make sure to unflag the 'old' theme as
                 * installed so it can be re-installed later.
                 */
                $themeManager->setUninstalled($themeDetails['code']);

                $dirName = $argDirName;
            }

            $this->info(sprintf('The theme %s has been installed. (now %s)', $themeDetails['code'], $dirName));
        }
        catch (Exception $ex) {
            $this->error($ex->getMessage());
        }
    }
807854
public function handler(): Response
    {
        $response = [];
        foreach (Mailer::all() as $mailer) {
            $response[] = [
                'id' => $mailer->getId(),
                'default' => $mailer->getDefault(),
                'remark' => $mailer->getRemark(),
                'driver' => $mailer->getDriver(),
                'host' => $mailer->getHost(),
                'port' => $mailer->getPort(),
                'encryption' => $mailer->getEncryption(),
                'username' => $mailer->getUsername(),
                'password' => $mailer->getPassword(),
                'sender' => $mailer->getSender()
            ];
        }
        return response($response);
    }
792616
public function handle()
    {
        $downloadFrom = config('translations.api.download_from');
        
        if(!$downloadFrom) {
            $this->warn('Data source for translations is not configured. Aborting.');
            return;
        }

        $this->line('');
        $this->info('Attempting to download translations from ' . $downloadFrom);

        $headers = [];
        $options = [
            'connect-timeout' => 60, // 1min
            'timeout' => 60 // 1min
        ];

        $request = Requests::get($downloadFrom, $headers, $options);

        $statusCode = $request->status_code;

        if($statusCode != 200) {
            $this->info('Status code ' . $statusCode . ' was received, but 200 was expected. Aborting.');
        }

        $json = $request->body;
        
        $newTranslations = array_map(function($stdClass){
            return (array) $stdClass;
        }, json_decode($json));

        $this->line('');
        $this->info('Downloaded! Attempting to import them in local system...');
        
        // Delete existing translations
        Translation::truncate();

        // Import new translations
        $this->line('');
        $bar = $this->output->createProgressBar(count($newTranslations));
        foreach (array_chunk($newTranslations, 300) as $chunk) {
            Translation::insert($chunk);
            $bar->advance(count($chunk));
        }

        $bar->finish();
        $this->line('');

        // @TODO refactor to use Facade (or something better)
        $translation = new Translation();
        $translation->import()->flushCache($json);

        $this->line('');
        $this->info('All done!');
        $this->line('');
    }
80997
public function handle()
    {
        switch (strtolower($_SERVER['QUERY_STRING'])){
        case 'wsdl':
            $this->intoStruct();
            $this->handleWSDL();
            break;
        case 'disco':
            $this->intoStruct();
            $this->handleDISCO();
            break;
        default:
            $this->intoStruct();
            if (isset($_SERVER['HTTP_SOAPACTION'])) {
                $this->createServer();
            } elseif (isset($_REQUEST['svc'])) {
               	$this->handleHTTP(); // by JG
            } else {
                $this->handleINFO();
            }
            break;
        }
    }
469672
public function handler(): Response
    {
        $response = [];
        foreach (Extension::all(['createdAt' => 'ASC']) as $extension) {
            $response[] = [
                'vendor' => $extension->getVendor(),
                'package' => $extension->getPackage(),
                'version' => $extension->getVersion(),
                'description' => $extension->getDescription(),
                'isActivated' => $extension->isActivated()
            ];
        }
        return response($response);
    }
1339617
public function handle()
    {
        $key = $this->getRandomKey();

        if ($this->option('show')) {
            return $this->line('<comment>'.$key.'</comment>');
        }

        $path = config_path('jwt.php');

        if (file_exists($path)) {
            file_put_contents($path, str_replace(
                $this->laravel['config']['jwt.secret'], $key, file_get_contents($path)
            ));
        }

        $this->laravel['config']['jwt.secret'] = $key;

        $this->info("jwt-auth secret [$key] set successfully.");
    }
1210741
public function handle()
    {
        $key = $this->generateRandomKey();

        if ($this->option('show')) {
            return $this->line('<comment>'.$key.'</comment>');
        }

        // Next, we will replace the application key in the environment file so it is
        // automatically setup for this developer. This key gets generated using a
        // secure random byte generator and is later base64 encoded for storage.
        if (! $this->setKeyInEnvironmentFile($key)) {
            return;
        }

        $this->laravel['config']['app.key'] = $key;

        $this->info('Application key set successfully.');
    }
751412
public function handle()
    {
        parent::handle();

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

        $this->performPostActions();
    }