Execute the console command.
For backward compatibility.

@return mixed
500974
public function fire()
    {
        $dbSocket = $this->option('db-socket');
        $dbHost   = $this->option('db-host');
        $dbName   = $this->option('db-name');

        if (! is_null($dbName) && (is_null($dbSocket) && is_null($dbHost))) {
            $this->error("Option '--db-name' requires at least one of: '--db-socket' OR '--db-host' to be defined.");
            return;
        }

        $configurator = new Configurator($this);
        $configurator->configure(
            $this->argument('app-id'),
            $this->option('config'),
            $this->option('cache-config'),
            $this->option('bucket'),
            $this->option('db-socket'),
            $this->option('db-name'),
            $this->option('db-host')
        );
    }
12692
public function handle()
    {
        $filesystem = new Filesystem;
        $filesystem->copyDirectory(
            __DIR__ . '/stubs/install',
            base_path()
        );
        $this->call('storage:link');

        if ($this->option('migrate')) {
            $this->call('migrate', ['--path' => str_replace(base_path(), '', __DIR__) . '/../../migrations']);
            $this->call('db:seed', ['--class' => \Kaiwh\Admin\Seeds\InitAdminSeeder::class]);
        }
    }
781304
public function handle()
    {
        $this->migrator->setConnection($this->option('database'));

        if (!$this->migrator->repositoryExists()) {
            return $this->error('No migrations found.');
        }

        $ran = $this->migrator->getRepository()->getRan();

        if (count($migrations = $this->getStatusFor($ran)) > 0) {
            $this->table(['Ran?', 'Migration'], $migrations);
        } else {
            $this->error('No migrations found');
        }
    }
920883
public function handle()
    {
        // If the package is not installed, abort removal
        if ( ! $this->packageIsInstalled()) {
            return $this->abortRemoval();
        }

        $this->startProgressBar();

        $this->removeConfigArrays();
        $this->replaceRouteServiceProvider();
        $this->removeLanguageMiddleware();
        $this->unregisterLanguageMiddleware();

        $this->stopProgressBar();
    }
719297
public function handle()
    {
        $class = config(
            'auth.providers.' . config(
                'auth.guards.' . config(
                    'auth.defaults.guard'
                ) . '.provider'
            ) . '.model'
        );
        $user = new $class;
        $fillables = $user->getFillable();
        foreach($fillables as $key => $fillable) {
            if ($fillable == 'password') {
                $user->password = \Hash::make($this->secret(($key+1) . "/" . count($fillables) . " User $fillable"));
            } else {
                $user->$fillable = $this->ask(($key+1) . "/" . count($fillables) . " User $fillable");
            }
        }
        if ($this->confirm("Do you want to create the user?", true)) {
            $user->save();
            $this->info("User created (id: {$user->id})");
        }

        return true;
    }
1075540
public function handle()
    {

        $this->clearCaches();

        // Make sure app is not installed
        // Ask to confirm
        $response = $this->ask('If you app is currently installed all your data will be deleted. Type DELETE if you really want to proceed!');
        if($response != 'DELETE') {
            $this->comment('Reinstall process abandoned!');
            return;
        }

        // Delete Uploads
        $this->comment("Cleaning directories");
        $this->cleanDirectories();

        if(file_exists(app()->environmentFilePath())) {
            // drop tables only if app is installed
            if(env('APP_KEY') !== 'SomeRandomString') {
                $this->comment("Dropping database tables");
                $this->dropAllTables();
            }

            // Delete env
            $this->comment("Deleting .env file");
            File::delete(app()->environmentFilePath());
        }

        $this->clearCaches();

        $this->block(' Successfully uninstalled', 'fg=white;bg=green;options=bold');
        $this->line('');
    }
920736
public function handle()
    {
        $type = $this->option('type');

        if (! is_null($type) && ! in_array($type, array('package', 'module', 'theme'))) {
            return $this->error("Invalid Packages type [$type].");
        }

        $packages = $this->getPackages($type);

        if (empty($packages)) {
            if (! is_null($type)) {
                return $this->error("Your application doesn't have any Packages of type [$type].");
            }

            return $this->error("Your application doesn't have any Packages.");
        }

        $this->displayPackages($packages);
    }
211839
public function handle()
	{
		$days = (int)$this->option( 'days' );

		if ( $days < 0 )
		{
			$this->writeError( "days option cannot be negative" );

			return self::ERROR;
		}

		$success = $this->manager->deleteBackupFiles( $this->lang_folder_path , $days , $this->option( 'dry-run' ) );

		return ( $success === true ) ? self::SUCCESS : self::ERROR;
	}
1209051
public function handle()
    {

        if ($class = $this->option('class')) {
            $classes = [$class];
        } else {
            $directory = $this->option('dir') ?: app_path();
            $classes = (new FindCacheableClasses($directory))->getAllCacheableClasses();
        }
        foreach ($classes as $className) {
            $this->rebuild($className);
        }
    }
953774
public function handle()
    {
        $folders         = $this->manager->getPath($this->folders);
        $this->display   = ! $this->option('silent');
        $extension       = $this->option('php-file-extension');
        $obsolete_prefix = (empty($this->obsolete_array_key)) ? '' : $this->obsolete_array_key.'.';

        //////////////////////////////////////////////////
        // Display where translations are searched in //
        //////////////////////////////////////////////////
        if ($this->option('verbose')) {
            $this->writeLine("Lemmas will be searched in the following directories:");

            foreach ($folders as $path) {
                $this->writeLine('    <info>'.$path.'</info>');
            }

            $this->writeLine('');
        }

        ////////////////////////////////
        // Parse all lemmas from code //
        ////////////////////////////////
        $lemmas = $this->manager->extractTranslationsFromFolders($folders, $this->trans_methods, $extension);

        if (count($lemmas) === 0) {
            $this->writeComment("No lemma has been found in code.");
            $this->writeLine("I have searched recursively in PHP files in these directories:");

            foreach ($this->manager->getPath($this->folders) as $path) {
                $this->writeLine("    ".$path);
            }

            $this->writeLine("for these functions/methods:");

            foreach ($this->trans_methods as $k => $v) {
                $this->writeLine("    ".$k);
            }

            return self::SUCCESS;
        }

        $this->writeLine((count($lemmas) > 1) ? count($lemmas)." lemmas have been found in code" : "1 lemma has been found in code");

        if ($this->option('verbose')) {
            foreach ($lemmas as $key => $value) {
                if (strpos($key, '.') !== false) {
                    $this->writeLine('    <info>'.$key.'</info> in file <comment>'.$this->manager->getShortPath($value).'</comment>');
                }
            }
        }

        /////////////////////////////////////////////
        // Convert dot lemmas to structured lemmas //
        /////////////////////////////////////////////
        if ($this->option('output-flat')) {
            $lemmas_structured = $this->manager->convertLemmaToFlatArray($lemmas);
        } else {
            $lemmas_structured = $this->manager->convertLemmaToStructuredArray($lemmas, $this->dot_notation_split_regex, null);
        }

        $this->writeLine('');

        /////////////////////////////////////
        // Generate lang files :           //
        // - add missing lemmas on top     //
        // - keep already defined lemmas   //
        // - add obsolete lemmas on bottom //
        /////////////////////////////////////
        try {
            $dir_lang = $this->manager->getLangPath($this->lang_folder_path);
        } catch (Exception $e) {
            switch ($e->getCode()) {
                //@codeCoverageIgnoreStart
                case Localization::NO_LANG_FOLDER_FOUND_IN_THESE_PATHS:
                    $this->writeError("No lang folder found in these paths:");
                    foreach ($e->getParameter() as $path) {
                        $this->writeError("- ".$path);
                    }
                    break;
                //@codeCoverageIgnoreEnd

                case Localization::NO_LANG_FOLDER_FOUND_IN_YOUR_CUSTOM_PATH:
                    $this->writeError('No lang folder found in your custom path: "'.$e->getParameter().'"');
                    break;
            }

            $this->writeLine('');

            return self::ERROR;
        }

        $job           = [];
        $there_are_new = false;

        $this->writeLine('Scan files:');

        /**
         * Parse all lang file types
         *
         * @var LangFileAbstract $langFileType
         */
        foreach (LangFile::getLangFiles($dir_lang, $this->json_languages) as $langFileType) {
            if ($langFileType->getTypeVendor()) {
                continue;
            }

            $lang = $langFileType->getLang();

            /**
             * Parse now all extracted families
             */
            foreach ($lemmas_structured as $family => $array) {
                if ($family === Localization::JSON_HEADER) {
                    $lang_file = new LangFileJson($dir_lang, $lang);
                } else {
                    $lang_file = new LangFileGenuine($dir_lang, $lang, $family);

                    if (in_array($family, $this->ignore_lang_files) || in_array($lang_file->getShortFilePath(), $this->ignore_lang_files)) {
                        if ($this->option('verbose')) {
                            $this->writeLine('');
                            $this->writeInfo("    ! Skip lang file '$family' !");
                        }
                        continue;
                    }
                }

                if ($this->option('verbose')) {
                    $this->writeLine('');
                }

                $this->writeLine('    '.$lang_file->getShortFilePath());

                if (! $this->option('dry-run')) {

                    if (! $lang_file->ensureFolder()) {
                        // @codeCoverageIgnoreStart
                        $this->writeError("    > Unable to create directory ".$lang_file->getFileFolderPath());

                        return self::ERROR;
                        // @codeCoverageIgnoreEnd
                    }

                    if (! $lang_file->isFolderWritable()) {
                        // @codeCoverageIgnoreStart
                        $this->writeError("    > Unable to write file in directory ".$lang_file->getFileFolderPath());

                        return self::ERROR;
                        // @codeCoverageIgnoreEnd
                    }

                    if (! $lang_file->fileExists()) {
                        // @codeCoverageIgnoreStart
                        $this->writeInfo("    > File has been created");
                        // @codeCoverageIgnoreEnd
                    }

                    if (! $lang_file->touch()) {
                        // @codeCoverageIgnoreStart
                        $this->writeError("    > Unable to touch file ".$lang_file->getFilePath());

                        return self::ERROR;
                        // @codeCoverageIgnoreEnd
                    }

                    if (! $lang_file->isReadable()) {
                        // @codeCoverageIgnoreStart
                        $this->writeError("    > Unable to read file ".$lang_file->getFilePath());

                        return self::ERROR;
                        // @codeCoverageIgnoreEnd
                    }

                    if (! $lang_file->isWritable()) {
                        // @codeCoverageIgnoreStart
                        $this->writeError("    > Unable to write in file ".$lang_file->getFilePath());

                        return self::ERROR;
                        // @codeCoverageIgnoreEnd
                    }
                }

                /** @noinspection PhpIncludeInspection */
                $a                        = $lang_file->load();
                $old_lemmas_with_obsolete = (is_array($a)) ? array_dot($a) : [];
                $new_lemmas               = array_dot($array);
                $final_lemmas             = [];
                $display_already_comment  = false;
                $something_to_do          = false;
                $i                        = 0;

                // Remove the obsolete prefix key
                $old_lemmas             = [];
                $obsolete_prefix_length = strlen($obsolete_prefix);
                foreach ($old_lemmas_with_obsolete as $key => $value) {
                    if (starts_with($key, $obsolete_prefix)) {
                        $key = substr($key, $obsolete_prefix_length);
                        if (! isset($old_lemmas[$key])) {
                            $old_lemmas[$key] = $value;
                        }
                    } else {
                        $old_lemmas[$key] = $value;
                    }
                }

                // Check if keys from new lemmas are not sub-keys from old_lemma (#47)
                // Ignore them if this is the case
                $new_lemmas_clean = $new_lemmas;
                $old_lemmas_clean = $old_lemmas;

                foreach ($new_lemmas as $new_key => $new_value) {
                    foreach ($old_lemmas as $old_key => $old_value) {
                        if (starts_with($old_key, $new_key.'.')) {
                            if ($this->option('verbose')) {
                                $this->writeLine("            <info>".$new_key."</info> seems to be used to access an array and is already defined in lang file as ".$old_key);
                                $this->writeLine("            <info>".$new_key."</info> not handled!");
                            }

                            unset($new_lemmas_clean[$new_key]);
                            unset($old_lemmas_clean[$old_key]);
                        }
                    }
                }

                $obsolete_lemmas = array_diff_key($old_lemmas_clean, $new_lemmas_clean);
                $welcome_lemmas  = array_diff_key($new_lemmas_clean, $old_lemmas_clean);
                $already_lemmas  = array_intersect_key($old_lemmas_clean, $new_lemmas_clean);

                // disable check for obsolete lemma and consolidate with already_lemmas
                if ($this->option('disable-obsolete-check')) {
                    $already_lemmas  = array_unique($obsolete_lemmas + $already_lemmas);
                    $obsolete_lemmas = [];
                }

                ksort($obsolete_lemmas);
                ksort($welcome_lemmas);
                ksort($already_lemmas);

                //////////////////////////
                // Deal with new lemmas //
                //////////////////////////
                if (count($welcome_lemmas) > 0) {
                    $display_already_comment               = true;
                    $something_to_do                       = true;
                    $there_are_new                         = true;
                    $final_lemmas["POTSKY___NEW___POTSKY"] = "POTSKY___NEW___POTSKY";

                    $this->writeInfo('        '.($c = count($welcome_lemmas)).' new string'.Tools::getPlural($c).' to translate');

                    foreach ($welcome_lemmas as $key => $value) {
                        if ($this->option('verbose')) {
                            $this->writeLine("            <info>".$key."</info> in ".$this->manager->getShortPath($value));
                        }
                        if (! $this->option('no-comment')) {
                            $final_lemmas['POTSKY___COMMENT___POTSKY'.$i] = "Defined in file $value";
                            $i                                            = $i + 1;
                        }

                        $key_last_token = preg_split($this->dot_notation_split_regex, $key);

                        if ($this->option('translation')) {
                            $translation = $this->manager->translate(end($key_last_token), $lang);
                        } else {
                            $translation = end($key_last_token);
                        }

                        if (strtolower($this->option('new-value')) === 'null') {
                            $translation = null;
                        } else {
                            $translation = str_replace('%LEMMA', $translation, $this->option('new-value'));
                        }

                        Tools::arraySet($final_lemmas, $key, $translation, $this->dot_notation_split_regex);
                    }
                }

                ///////////////////////////////
                // Deal with existing lemmas //
                ///////////////////////////////
                if (count($already_lemmas) > 0) {
                    if ($this->option('verbose')) {
                        $this->writeLine('        '.($c = count($already_lemmas)).' already translated string'.Tools::getPlural($c));
                    }

                    $final_lemmas["POTSKY___OLD___POTSKY"] = "POTSKY___OLD___POTSKY";

                    foreach ($already_lemmas as $key => $value) {
                        Tools::arraySet($final_lemmas, $key, $value, $this->dot_notation_split_regex);
                    }
                }

                ///////////////////////////////
                // Deal with obsolete lemmas //
                ///////////////////////////////
                if (count($obsolete_lemmas) > 0) {
                    $protected_already_included = false;

                    // Remove all dynamic fields
                    foreach ($obsolete_lemmas as $key => $value) {
                        foreach ($this->never_obsolete_keys as $remove) {
                            if ((strpos($key, '.'.$remove.'.') !== false) || starts_with($key, $remove.'.')) {
                                if ($this->option('verbose')) {
                                    $this->writeLine("        <comment>".$key."</comment> is protected as a dynamic lemma");
                                }

                                unset($obsolete_lemmas[$key]);

                                if ($protected_already_included === false) {
                                    $final_lemmas["POTSKY___PROTECTED___POTSKY"] = "POTSKY___PROTECTED___POTSKY";
                                    $protected_already_included                  = true;
                                }

                                // Given that this lemma is never obsolete, we need to send it back to the final lemma array
                                Tools::arraySet($final_lemmas, $key, $value, $this->dot_notation_split_regex);
                            }
                        }
                    }
                }

                /////////////////////////////////////
                // Fill the final lemmas array now //
                /////////////////////////////////////
                if (count($obsolete_lemmas) > 0) {
                    $display_already_comment = true;
                    $something_to_do         = true;

                    if ($this->option('no-obsolete')) {
                        $this->writeComment("        ".($c = count($obsolete_lemmas)).' obsolete string'.Tools::getPlural($c).' (will be deleted)');
                    } else {
                        $this->writeComment("        ".($c = count($obsolete_lemmas)).' obsolete string'.Tools::getPlural($c).' (can be deleted manually in the generated file)');

                        $final_lemmas["POTSKY___OBSOLETE___POTSKY"] = "POTSKY___OBSOLETE___POTSKY";

                        foreach ($obsolete_lemmas as $key => $value) {
                            if ($this->option('verbose')) {
                                $this->writeLine("            <comment>".$key."</comment>");
                            }

                            Tools::arraySet($final_lemmas, $obsolete_prefix.$key, $value, $this->dot_notation_split_regex);
                        }
                    }
                }

                // Flat style
                if ($this->option('output-flat')) {
                    $final_lemmas = array_dot($final_lemmas);
                }

                if (($something_to_do === true) || ($this->option('force'))) {
                    $content = var_export($final_lemmas, true);
                    $content = preg_replace("@'POTSKY___COMMENT___POTSKY[0-9]*' => '(.*)',@", '// $1', $content);
                    $content = str_replace([
                        "'POTSKY___NEW___POTSKY' => 'POTSKY___NEW___POTSKY',",
                        "'POTSKY___OLD___POTSKY' => 'POTSKY___OLD___POTSKY',",
                        "'POTSKY___PROTECTED___POTSKY' => 'POTSKY___PROTECTED___POTSKY',",
                        "'POTSKY___OBSOLETE___POTSKY' => 'POTSKY___OBSOLETE___POTSKY',",
                    ], [
                        '//============================== New strings to translate ==============================//',
                        ($display_already_comment === true) ? '//==================================== Translations ====================================//' : '',
                        '//============================== Dynamic protected strings =============================//',
                        '//================================== Obsolete strings ==================================//',
                    ], $content);

                    $file_content = "<?php\n";

                    if (! $this->option('no-date')) {
                        $a            = " Generated via \"php artisan ".$this->argument('command')."\" at ".date("Y/m/d H:i:s")." ";
                        $file_content .= "/".str_repeat('*', strlen($a))."\n".$a."\n".str_repeat('*', strlen($a))."/\n";
                    }

                    $file_content                   .= "\nreturn ".$content.";";
                    $job[$lang_file->getFilePath()] = $file_content;
                } else {
                    if ($this->option('verbose')) {
                        $this->writeLine("        > <comment>Nothing to do for this file</comment>");
                    }
                }
            }
        }

        ///////////////////////////////////////////
        // Silent mode                           //
        // only return an exit code on new lemma //
        ///////////////////////////////////////////
        if ($this->option('silent')) {
            if ($there_are_new === true) {
                return self::ERROR;
            } else {
                // @codeCoverageIgnoreStart
                return self::SUCCESS;
                // @codeCoverageIgnoreEnd
            }
        }

        ///////////////////////////////////////////
        // Normal mode                           //
        ///////////////////////////////////////////
        if (count($job) > 0) {

            if ($this->option('no-interaction')) {
                $do = true;
            } // @codeCoverageIgnoreStart
            else {
                $this->writeLine('');
                $do = ($this->ask('Do you wish to apply these changes now? [yes|no]') === 'yes');
                $this->writeLine('');
            }
            // @codeCoverageIgnoreEnd

            if ($do === true) {

                if (! $this->option('no-backup')) {
                    $this->writeLine('Backup files:');

                    $now = $this->manager->getBackupDate();

                    foreach ($job as $file_lang_path => $file_content) {
                        $backup_path = $this->manager->getBackupPath($file_lang_path, $now, $extension);

                        if (! $this->option('dry-run')) {
                            rename($file_lang_path, $backup_path);
                        }

                        $this->writeLine("    <info>".$this->manager->getShortPath($file_lang_path)."</info> -> <info>".$this->manager->getShortPath($backup_path)."</info>");
                    }

                    $this->writeLine('');
                }

                $this->writeLine('Save files:');
                $open_files = '';

                foreach ($job as $file_lang_path => $file_content) {
                    if (! $this->option('dry-run')) {
                        file_put_contents($file_lang_path, $file_content);
                    }

                    $this->writeLine("    <info>".$this->manager->getShortPath($file_lang_path)."</info>");

                    // Fix code style
                    try {
                        $this->manager->fixCodeStyle($file_lang_path, $this->code_style_rules);
                    } // @codeCoverageIgnoreStart
                    catch (Exception $e) {
                        $this->writeError("    Cannot fix code style (".$e->getMessage().")");
                    }
                    // @codeCoverageIgnoreEnd

                    // @codeCoverageIgnoreStart
                    if ($this->option('editor')) {
                        $open_files .= ' '.escapeshellarg($file_lang_path);
                    }
                    // @codeCoverageIgnoreEnd

                }

                $this->writeLine('');
                $this->writeInfo('Process done!');

                // @codeCoverageIgnoreStart
                if ($this->option('editor')) {
                    exec($this->editor.$open_files);
                }
                // @codeCoverageIgnoreEnd

                // @codeCoverageIgnoreStart
            } else {
                $this->writeLine('');
                $this->writeComment('Process aborted. No file has been changed.');
            }
        } // @codeCoverageIgnoreEnd
        else {
            $this->writeLine('');
            $this->writeInfo('Drink a Piña colada and/or smoke Super Skunk, you have nothing to do!');
        }
        $this->writeLine('');

        return self::SUCCESS;
    }
100345
public function handle()
    {
        $this->currentRoot = trim($this->laravel->getNamespace(), '\\');

        $this->setAppDirectoryNamespace();
        $this->setBootstrapNamespaces();
        $this->setConfigNamespaces();
        $this->setComposerNamespace();
        $this->setDatabaseFactoryNamespaces();

        $this->info('Application namespace set!');

        $this->composer->dumpAutoloads();

        $this->call('optimize:clear');
    }
236846
public function handle()
    {
        $this->basePath = $this->getMigrationPath();
        $migrations = $this->migrator->getMigrationFiles($this->basePath);
        $count = count($migrations);

        if ($count == 0) {
            $this->comment('No migrations to move');

            return;
        }

        foreach ($migrations as $migration_name => $migration_path) {
            $datePath = $this->migrator->getDateFolderStructure($migration_name);
            // Move the migration into base migration folder
            $this->files->move($this->basePath.'/'.$datePath.$migration_name.'.php', $this->basePath.'/'.$migration_name.'.php');
        }

        $this->info('Migrations disorganised successfully ('.$count.' migrations moved)');
        $this->cleanup();
    }
518055
public function handle()
    {
        foreach ($this->getJobIds() as $id) {
            $job = $this->laravel['queue.failer']->find($id);

            if (is_null($job)) {
                $this->error("Unable to find failed job with ID [{$id}].");
            } else {
                $this->retryJob($job);

                $this->info("The failed job [{$id}] has been pushed back onto the queue!");

                $this->laravel['queue.failer']->forget($id);
            }
        }
    }
607912
public function handle()
    {
        if ($this->arguments()->getOption('country', false)) {
            $this->writeln('Country specified was ' . ucfirst($this->arguments()->getOption('country')) . '.');
            $this->exitWithSuccess();
        }
        $this->writeln('Flags huh? - Run this helloworld.php flags --country="england" and see what happens!');
        $this->exitWithError();
    }
1133668
public function handle()
    {
        $exists = false;

        if (File::exists($this->publishedMigrationRealpath())) {
            $exists = true;

            if (!$this->confirm('The migration file already exists, overwrite it? [Yes|no]')) {
                return $this->info('Okay, no changes made to the file.');
            }
        }

        $inputFile = file_get_contents($this->localMigrationRealpath());

        $outputFile = fopen($this->publishedMigrationRealpath(), 'w');

        if ($inputFile && $outputFile) {
            fwrite($outputFile, $inputFile);

            fclose($outputFile);
        } else {
            File::delete($this->publishedMigrationRealpath());

            return $this->error(
                        'There was an error creating the migration file, '
                        .'check write permissions for ' . base_path('database') . DIRECTORY_SEPARATOR . 'migrations'
                        .PHP_EOL
                        .PHP_EOL
                        .'If you think this is a bug, please submit a bug report '
                        .'at https://github.com/moharrum/laravel-geoip-world-cities/issues'
                    );
        }

        if(! $exists) {
            $this->info('Okay, migration file created successfully.');

            return;
        }

        $this->info('Okay, migration file overwritten successfully.');
    }
103812
public function handle()
    {
        $this->abortCommandExecution();

        $this->url = $this->obtainAPIURLEndpoint();
        
        $response = $this->http->get($this->url, [
                'headers' => [
                    'X-Requested-With' => 'XMLHttpRequest',
                    'Authorization' => 'Bearer ' . fp_env('ACACHA_FORGE_ACCESS_TOKEN')
                ]
            ]
        );

        $certificates = json_decode($response->getBody(), true) ;
        if ($this->option('dump')) {
            dump($certificates);
        }

        if (empty($certificates)) {
            $this->error('No SSL certificates found.');
            die();
        }

        $headers = ['Id', 'ServerId','SiteId','Domain','Type','Request Status','Existing','Active','Created at'];

        $rows = [];
        foreach ($certificates as $certificate) {
            $rows[] = [
                $certificate['id'],
                $certificate['serverId'],
                $certificate['siteId'],
                $certificate['domain'],
                $certificate['type'],
                $certificate['requestStatus'],
                $certificate['createdAt'],
                $certificate['existing'],
                $certificate['active']
            ];
        }

        $this->table($headers, $rows);
    }
1252119
public function handle()
    {
        $files = [
            $this->laravel->getCachedServicesPath(),
            $this->laravel->getCachedExtensionServicesPath(),
        ];

        foreach ($files as $file) {
            if (file_exists($file)) {
                @unlink($file);
            }
        }
    }