Execute the console command.

@return mixed
322789
public function handle()
    {

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

        $client = $this->es->connection($connection)->raw();

        $indices = !is_null($this->argument('index')) ?
            [$this->argument('index')] :
            array_keys(config('es.indices'));

        foreach ($indices as $index) {

            $config = config("es.indices.{$index}");

            if (is_null($config)) {
                $this->warn("Missing configuration for index: {$index}");
                continue;
            }

            if (!$client->indices()->exists(['index' => $index])) {

                return $this->call("es:indices:create", [
                    "index" => $index
                ]);

            }

            // The index is already exists. update aliases and setting

            // Remove all index aliases

            $this->info("Removing aliases for index: {$index}");

            $client->indices()->updateAliases([
                "body" => [
                    'actions' => [
                        [
                            'remove' => [
                                'index' => $index,
                                'alias' => "*"
                            ]
                        ]
                    ]

                ],

                'client' => ['ignore' => [404]]
            ]);

            if (isset($config['aliases'])) {

                // Update index aliases from config

                foreach ($config['aliases'] as $alias) {

                    $this->info("Creating alias: {$alias} for index: {$index}");

                    $client->indices()->updateAliases([
                        "body" => [
                            'actions' => [
                                [
                                    'add' => [
                                        'index' => $index,
                                        'alias' => $alias
                                    ]
                                ]
                            ]

                        ]
                    ]);

                }

            }

            if (isset($config['mappings'])) {

                foreach ($config['mappings'] as $type => $mapping) {

                    // Create mapping for type from config file

                    $this->info("Creating mapping for type: {$type} in index: {$index}");

                    $client->indices()->putMapping([
                        'index' => $index,
                        'type' => $type,
                        'body' => $mapping
                    ]);

                }
            }
        }
    }
191560
public function handle()
    {
        // Get Settings
        $defaultCurrency = $this->currency->config('default');

        if ($this->input->getOption('google')) {
            // Get rates from google
            return $this->updateFromGoogle($defaultCurrency);
        }

        if ($this->input->getOption('openexchangerates')) {
            if (!$api = $this->currency->config('api_key')) {
                $this->error('An API key is needed from OpenExchangeRates.org to continue.');

                return;
            }

            // Get rates from OpenExchangeRates
            return $this->updateFromOpenExchangeRates($defaultCurrency, $api);
        }
    }
268098
public function handle()
    {
        if (file_exists($publicPath = public_path('assets'))) {
            return $this->error('The "webroot/assets" directory already exists.');
        }

        $assetsPath = $this->container['config']->get('routing.assets.path', base_path('assets'));

        $this->container->make('files')->link(
            $assetsPath, $publicPath
        );

        $this->info('The [webroot/assets] directory has been linked.');
    }
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);
    }
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]);
        }
    }
178863
public static function handle()
	{
		$args = func_get_args();
		$key = array_shift( $args );
		
		return call_user_func_array( array( static::$builder, 'build_'.$key ), $args );
	}
378925
public function handle()
    {
        $this->tables = $this->getTablesFromMWBFile();
        if ($this->tables === false) {
            return false;
        }
        $this->getAppJson();

        $success = $this->validateTableSchema();
        if (!$success) {
            return false;
        }

        $tableName = $this->option('table');
        if (!empty($tableName)) {
            $table = $this->findTableFromName($tableName);
            if (empty($table)) {
                $this->output('Table ( '.$tableName.' ) doesn\'t exist.', 'error');

                return false;
            }
            $this->tables = [$table];
        }

        $this->databaseService = new DatabaseService($this->config, $this->files);
        $this->databaseService->resetDatabase();

        $this->generateMigration();
        $this->generateModel();

        $this->styleCode();

        $this->databaseService->dropDatabase();

        return true;
    }
1231285
public function handle()
	{
		$lemma   = $this->argument( 'lemma' );
		$folders = $this->manager->getPath( $this->folders );

		//////////////////////////////////////////////////
		// Display where translatations 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 //
		////////////////////////////////
		$files = $this->manager->findLemma( $lemma , $folders , $this->trans_methods , $this->option( 'regex' ) , $this->option( 'short' ) );

		if ( ( is_array( $files ) ) && ( count( $files ) > 0 ) )
		{
			$this->writeLine( 'Lemma <info>' . $lemma . '</info> has been found in:' );
			foreach ( $files as $file )
			{
				$this->writeLine( '    <info>' . $file . '</info>' );
			}

			return self::SUCCESS;
		}
		else
		{
			return self::ERROR;
		}
	}
1011116
public function handle()
    {
        $continue = true;
        $this->rollback = $this->option('rollback');
        $this->loadPluginDevUtilities();
        if ($this->rollback) {
            $pluginDevUtilities = $this->pluginDevUtilities;
            if (
                isset($pluginDevUtilities['current']) &&
                isset($pluginDevUtilities['old']) &&
                isset($pluginDevUtilities['replace']) &&
                isset($pluginDevUtilities['replace-rollback'])
            ) {
                $this->pluginDevUtilities['old'] = $pluginDevUtilities['current'];
                $this->pluginDevUtilities['current'] = $pluginDevUtilities['old'];
                $this->pluginDevUtilities['replace'] = $pluginDevUtilities['replace-rollback'];
            } else {
                $this->error("File: developer.json is corrupted.");
                $continue = false;
            }

        } else {
            $this->loadPluginUtilitiesToProcess();
        }
        if ($continue) {
            $continue = $this->printConfirmablePluginUtilitiesTable();
        }
        if ($continue) {
            $continue = $this->printConfirmablePluginNamespaceTable();
        }
        if ($continue) {
            $this->renamePluginUtilities();
            $res = `composer dump-autoload --optimize`;
            if ($this->pluginDevUtilities['old']['slug'] != $this->pluginDevUtilities['current']['slug']) {
                $res = `npm run dev`;
            }

            if (!$this->rollback) {
                $replaceRollback = [];
                if (
                    isset($this->pluginDevUtilities['replace']) &&
                    is_array($this->pluginDevUtilities['replace'])
                ) {

                    foreach ($this->pluginDevUtilities['replace'] as $key => $val) {
                        $replaceRollback[$val] = $key;
                    }
                    $replaceRollback = array_reverse($replaceRollback);
                }
                $this->pluginDevUtilities['replace-rollback'] = $replaceRollback;
            } else {
                $this->pluginDevUtilities['replace'] = $pluginDevUtilities['replace'];
                unset($this->pluginDevUtilities['old']);
                unset($this->pluginDevUtilities['replace-rollback']);
            }
            $this->plugin['files']->put($this->developerFile, json_encode($this->pluginDevUtilities, JSON_PRETTY_PRINT));

            $this->info("Process Complete... Check the result from your Wordpress Dashboard.");
            if (!$this->rollback) {
                if ($this->confirm("Type yes to rolling back, if fatal error occured.")) {
                    $this->call("plugin:rename", ['--rollback' => true]);
                }
            }
        }
1215208
public function handle()
    {
        $translation = $this->dbTransaction(function () {
            $translation = new FileTranslation();
            $translation->fill([
                'title'         => $this->title,
                'language_code' => $this->language->code,
                'description'   => $this->attributes['description']
            ]);
            $translation->author()->associate($this->author);

            $this->file->removeExistingTranslation($translation->language_code);
            $this->file->translations()->save($translation);

            event('file.translation.created', [$translation]);
            return $translation;
        });
        return $translation;
    }
218521
public function handle()
    {

        $connectionName = ! empty($this->argument('connection')) && $this->argument('connection') != 'null'
            ? $this->argument('connection') : config('database.default');
        $connection = config('database.connections.' . $connectionName);

        if (empty($connection)) {
            $this->info('No connection details');
            return false;
        }

        if ($connection['driver'] != 'mysql') {
            return $this->notMysql();
        }

        $cmd = $this->makeCommand($connection, $connectionName);

        try {
            exec($cmd);
        } catch (\Exception $e) {
            $this->info('There was an error');
            $this->info('Message: ' . $e->getMessage());
            $this->info('Trace: ' . $e->getTraceAsString());
            return false;
        }

    }
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('');
    }
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();
    }
872642
public function handle() {
        \File::copy(__DIR__ . '/../environment/config/filesystems.php', base_path('config/filesystems.php'));
        \Config::set('filesystems.default', 'it');

        $plugin = $this->argument('plugin');
        if (in_array($plugin, $this->plugins)) {
            if ($plugin == 'merge') {
                $this->info('It' . $this->beer . ' preparing file system merge');
                $this->merge();
            } else if ($plugin == 'laravelcollective') {
                $this->laravelcollective();
            } else if ($plugin == 'yajra') {
                $this->yajra();
            } else if ($plugin == 'intervention') {
                $this->intervention();
            }
        } else {
            $plugg = [];

            $this->error('It' . $this->beer . ' Whoops please choose - plugin from list');
            $headers = [
                'Command (php artisan it:install)',
                'Description',
            ];
            foreach ($this->plugins as $plug) {
                if ($plug == 'merge') {
                    $title = 'A Controller File Project to merge your files';
                } elseif ($plug == 'payment') {
                    $title = 'Payment Getway trusted Packages Paypal,Cashu,payfort & much more ... ';
                } elseif ($plug == 'editors') {
                    $title = 'Ckeditor,NiceEdit,jWYSIWYG,summernote,react-rte & much more ...  ';
                } elseif ($plug == 'baboon') {
                    $title = 'Baboon CRUD System (MVC-SD) Created By Mahmoud Ibrahim v1';
                } elseif ($plug == 'laravelcollective') {
                    $title = 'Install Laravel Collective Package (laravelcollective.com) ';
                } elseif ($plug == 'yajra') {
                    $title = 'Install yajra datatable Package (yajrabox.com) ';
                } elseif ($plug == 'intervention') {
                    $title = 'Install intervention Image Package (image.intervention.io) ';
                }
                array_push($plugg, [$plug, $title]);
            }
            $this->table($headers, $plugg);
        }
    }
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());
        }
    }
1188441
public function handle()
    {
        $id = $this->argument('id');

        if ($id === null) {
            $this->table(
                ['ID', 'Email'],
                User::all(['id', 'email'])->toArray()
            );
            $id = $this->ask('ID?');
        }

        User::where('id', $id)->update([
            'password' => bcrypt($this->secret('New password?'))
        ]);

        $this->info('User was updated');
    }
635532
public function handle()
	{
		$theme = strtolower($this->argument('name'));
		$new_theme = strtolower($this->argument('new-name'));

		$theme_path = $this->getPath($theme);
		$new_theme_path = $this->getPath($new_theme);

		if(!$this->files->isDirectory($theme_path)){
			return $this->error('Theme "'.$theme.'" does not exist.');
		}

		if($this->files->isDirectory($new_theme_path)){
			return $this->error('Theme "'.$new_theme.'" is already exists.');
		}

		$this->files->copyDirectory($theme_path, $new_theme_path);

		$this->info('Theme "'.$new_theme.'" has been created.');
	}