Execute the console command.

@return mixed
504711
public function handle()
    {
        $p = $this->option('p');
        $f = $this->option('f');
        $t = $this->option('t');
        $path    = realpath(base_path());
        $appPath    = realpath(app_path());
        if($p !== null && $p !=='all') {
            if($f == 'app') {
                $hooks = $this->files->glob($appPath.'/'.$p.'/Hook/config.php');
            } else {
                $hooks = $this->files->glob($path.'/'.$p.'/Hook/config.php');
            }
            if($hooks) {
                $hookLists = $this->files->getRequire($hooks[0])['hookList'];
                $hookInjects = $this->files->getRequire($hooks[0])['hookInject'];
                $this->initHook($hookLists, $t);
                $this->initHookInject($hookInjects, $t);
            }
        } else if($p !== null && $p === 'all') {
            // $defaultHookList = config('hook.default.hookList');
            // $defaulHookInject = config('hook.default.hookInject');
            // $this->initHook($defaultHookList);
            // $this->initHookInject($defaulHookInject);
            $hooks = $this->files->glob($appPath.'/Hook/config.php');
            if($hooks) {
                $hookLists = $this->files->getRequire($hooks[0])['hookList'];
                $hookInjects = $this->files->getRequire($hooks[0])['hookInject'];
                $this->initHook($hookLists);
                $this->initHookInject($hookInjects);
            }
            $mhooks = $this->files->glob($appPath.'/Modules/*/Hook/config.php');
            if($mhooks) {
                foreach ($mhooks as $hook) {
                    $hookLists = $this->files->getRequire($hook)['hookList'];
                    $hookInjects = $this->files->getRequire($hook)['hookInject'];
                    $this->initHook($hookLists);
                    $this->initHookInject($hookInjects);
                }
            }
            $vhooks = $this->files->glob($path.'/vendor/huasituo/*/src/Hook/config.php');
            if($vhooks) {
                foreach ($vhooks as $hook) {
                    $hookLists = $this->files->getRequire($hook)['hookList'];
                    $hookInjects = $this->files->getRequire($hook)['hookInject'];
                    $this->initHook($hookLists);
                    $this->initHookInject($hookInjects);
                }
            }
        }
        $data = HookModel::setCache();
        $injectAll = HookInjectModel::setAllCache();
        $inject = HookInjectModel::setCache();
        $this->info('hook cache ok!');
    }
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]);
                }
            }
        }
1355624
public function handle()
    {

        $this->modelName = $this->formatModel($this->argument('ParentName'));

        $this->modelPath = $this->formatModelPath($this->argument('ParentName'));

        $this->childName = $this->formatModel($this->argument('ChildName'));

        $this->setCommandType($this->argument('command'));

        $this->setRelationshipPath();

        if ( $this->extractMethodsFromFiles() ) {

            $this->sendParentSuccessMessage();



        } else {

            $this->error('Oops, something went wrong!');

        }


        $this->clearFilePaths();

        $this->modelName = $this->formatModel($this->argument('ChildName'));

        $this->modelPath = $this->formatModelPath($this->argument('ChildName'));

        $this->setCommandType($this->argument('command'));

        $this->setCrudPaths();

        if ( $this->deleteFiles() ) {

            $this->sendChildSuccessMessage();


        } else {

            $this->error('Oops, something went wrong!');

        }

        $this->clearFilePaths();


        $this->folderName = $this->formatModelPath($this->argument('ChildName'));

        $this->modelName = $this->formatModel($this->argument('ChildName'));

        $this->setCommandType($this->argument('command'));

        $this->setViewPaths();

        $path = base_path('resources/views/'. $this->folderName);

        if ( $this->removeViewFolder($path) && $this->deleteFiles() ) {

            return $this->sendChildViewsSuccessMessage();

        }

        $this->error('No Such Directory');


    }
940513
public function handle()
    {
        $targetName = $this->getTargetName();
        $name       = $this->parseName($targetName);

        return $this->generate($name, $this->getAdditionalData());
    }
576974
public function handle()
    {
        // Retrieve attributes
        $attributes = config('commands.user_attributes');

        // Retrieve sensitive fields
        $sensitive_attributes = config('commands.user_attributes_sensitive');

        // Ask questions and prepare data
        foreach ($attributes as $attribute => $question) {
            if (is_null($attribute) || $attribute === 0) {
                $attribute = $question;
            }

            // Check if sensitive field
            if (in_array($attribute, $sensitive_attributes)) {
                $attributes[$attribute] = Hash::make($this->secret($question));
                continue;
            }

            $attributes[$attribute] = $this->ask($question);
        }

        // Create new user
        try {
            $user = App::make(config('commands.user'));
            $user::create($attributes);
            $this->info('User created');
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }
    }
582614
public function handle()
    {
        $app = app();
        $this->version = (int) str_replace('.', '', $app->version());

        // check if module exists
        if ($this->files->exists(app_path().'/Modules/'.studly_case($this->getNameInput()))) {
            return $this->error($this->type.' already exists!');
        }

        // Create Controller
        $this->generate('controller');

        // Create Model
        $this->generate('model');

        // Create Views folder
        $this->generate('view');

        //Flag for no translation
        if (! $this->option('no-translation')) { // Create Translations folder
            $this->generate('translation');
        }

        if ($this->version < 530) {

            // Create Routes file
            $this->generate('routes');
        } else {

            // Create WEB Routes file
            $this->generate('web');
            
            // Create API Routes file
            $this->generate('api');
        }
        
        // Create Helper file
        $this->generate('helper');



        if (! $this->option('no-migration')) {

            // without hacky studly_case function
            // foo-bar results in foo-bar and not in foo_bar
            $table = str_plural(snake_case(studly_case($this->getNameInput())));
            $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
        }

        $this->info($this->type.' created successfully.');
    }
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;
        }

    }
555802
public function handle()
    {
        $version = $this->version();

        $all = $this->option('all');

        $currentOS = OperatingSystem::id();

        foreach ($this->slugs as $os => $slug) {
            if ($all || ($os === $currentOS)) {
                $archive = $this->download($version, $slug);

                $binary = $this->extract($archive);

                $this->rename($binary, $os);
            }
        }

        $message = 'ChromeDriver %s successfully installed for version %s.';

        $this->info(sprintf($message, $all ? 'binaries' : 'binary', $version));
    }
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);
    }
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;
    }
190397
public function handle()
    {
        $this->info(sprintf('%s (v%s)', config('setup.title'), self::VERSION));

        $pretend = (bool) $this->option('pretend');
        $steps   = (array) $this->argument('step');
        $return  = $this->runSteps($steps, $pretend);

        $this->info('Setup finished.');

        return $return;
    }
1286894
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        $slug = $this->argument('slug');

        if (! empty($slug)) {
            if (! $this->packages->exists($slug)) {
                return $this->error('Package does not exist.');
            }

            if ($this->packages->isEnabled($slug)) {
                $this->seed($slug);
            } else if ($this->option('force')) {
                $this->seed($slug);
            }

            return;
        }

        if ($this->option('force')) {
            $packages = $this->packages->all();
        } else {
            $packages = $this->packages->enabled();
        }

        foreach ($packages as $package) {
            $slug = $package['slug'];

            $this->seed($slug);
        }
    }
360404
public function handle()
    {
        $id = $this->argument('id');
        $rule = $this->argument('rule');

        if( $id && $rule ) {
            $this->generateThumbByRule($id, $rule);
        } else {
            if( $id ) {
                $this->generateGlobalThumb($id);
            } else {

                if( $this->confirm('Are you sure you want to generate thumbs for all resources?') ) {
                    $list = HCResources::all()->pluck('id');

                    foreach ( $list as $id )
                        $this->generateGlobalThumb($id);
                }
            }
        }
    }
178863
public static function handle()
	{
		$args = func_get_args();
		$key = array_shift( $args );
		
		return call_user_func_array( array( static::$builder, 'build_'.$key ), $args );
	}
850465
public function handle()
	{
		$connection = $this->argument('connection') ?: $this->config->get('queue.default');
		$queue = $this->argument('queue') ?: $this->config->get('queue.connections.' . $connection  . '.queue');

		$this->info(sprintf('Clearing queue "%s" on "%s"', $queue, $connection));
		$cleared = $this->clearer->clear($connection, $queue);
		$this->info(sprintf('Cleared %d jobs', $cleared));
	}
681188
public function handle()
	{
		if ($this->files->isDirectory($this->getPath(null))){
			return $this->error('Theme "'.$this->getTheme().'" is already exists.');
		}

		$this->makeDirs([
						'assets/css',
						'assets/js',
						'assets/img',
						'layouts',
						'partials/sections',
						'views',
						'widgets',
						]);

		$this->makeFiles([
						'layout.blade.php'	=> 'layouts/',
						'header.blade.php'	=> 'partials/',
						'footer.blade.php'	=> 'partials/',
						'main.blade.php'	=> 'partials/sections/',
						'index.blade.php'	=> 'views/',
						'style.css'			=> 'assets/css/',
						'script.js'			=> 'assets/js/',
						'theme.json'		=> '',
						'gulpfile.js'		=> '',
						'config.php'		=> ''
						]);

		$this->info('Theme "'.$this->getTheme().'" has been created.');
	}
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();
    }