Execute the console command.

@return mixed
179125
public function handle()
    {
        $exactFileContent = file_get_contents(base_path($this->routesFilePath));

        $preparedFileContent = $this->prepareFileContent($exactFileContent);

        $output = '';

        foreach (explode("\n", $preparedFileContent) as $line) {
            $preparedLine = $this->prepareLine($line);

            if (preg_match('/controller(?:[^s\(]*)\(([^,]*),([^,)]*)/', $preparedLine, $matches)) {
                if (count($matches) != 3) {
                    $this->error($preparedLine.' Looks weird, unable to parse it.');
                }

                preg_match('/^( *)/', $line, $spaces);

                $output .= $this->extractController(trim($matches[1], '\''), trim($matches[2], '\''), $spaces[1]);
            } elseif (preg_match('/controllers(?:[^\(]*)\((.*)\)/', $preparedLine, $matches)) {
                preg_match('/^( *)/', $line, $spaces);

                $output .= $this->extractControllers($matches[1], $spaces[1]);
            } else {
                $output .= $line."\n";
            }
        }

        file_put_contents(base_path($this->routesFilePath . '.generated'), $output);

        file_put_contents(base_path($this->routesFilePath . '.backup'), $preparedFileContent);

        $this->info('Done! Generated file was published in "'.base_path($this->routesFilePath . '.generated').'"');

        $this->info('Also a backup of '. basename('$this->routesFilePath') .' was published in "'.base_path($this->routesFilePath . '.backup').'"');
    }
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.');
    }
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));
	}
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.');
    }
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();
    }
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');
    }
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');


    }
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;
    }
1019657
public function handle()
    {
        if (!file_exists(base_path('.env'))) {
            $this->error('File .env not found');
            return false;
        }
        if (config('app.key') == '') {
            $this->info('Key Generate...');
            $this->call('key:generate');
        }
        if (!is_link(public_path('storage'))) {
            $this->info('Storage Link...');
            $this->call('storage:link');
        }
        if (!file_exists(app_path('Http/Controllers/HomeController.php')) && $this->confirm('Do you want to run make:auth?')) {
            $this->info('Make Auth...');
            $this->call('make:auth');
        }
        $this->info('Migrate and Seeding...');
        if ($this->option('migrate-fresh')) {
            $this->call('migrate:fresh', [ '--seed' => true ]);
        } elseif ($this->option('migrate-refresh')) {
            $this->call('migrate:refresh', [ '--seed' => true ]);
        } else {
            $this->call('migrate', [ '--seed' => true ]);
        }
        if (!file_exists(storage_path('oauth-private.key')) || !file_exists(storage_path('oauth-public.key'))) {
            $this->info('Passport Key Generate...');
            $this->call('passport:install');
        }

        return true;
    }
1011421
public function handle()
    {
        $this->meta = (new NameParser)->parse($this->argumentName());

        $name = $this->qualifyClass($this->getNameInput());
        $path = $this->getPath($name);

        if ($this->files->exists($path) && $this->optionForce() === false) {
            return $this->error($this->type . ' already exists!');
        }

        $this->makeDirectory($path);
        $this->files->put($path, $this->buildClass($name));

        $this->info($this->type . ' created successfully.');
        $this->info('- ' . $path);

        // if model is required
        if ($this->optionModel() === true || $this->optionModel() === 'true') {
            $this->call('generate:model', [
                'name'     => $this->getModelName(),
                '--plain'  => $this->optionPlain(),
                '--force'  => $this->optionForce(),
                '--schema' => $this->optionSchema()
            ]);
        }
    }
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;
    }
1274894
public function handle()
    {
        $this->abortCommandExecution();
        $file = $this->argument('file');
        $this->runScp(base_path($file), $this->domain, null, true);
    }
766979
public function handle()
    {
        $name = $this->argument('name');
        $createMigration = $this->option('m');
        $createResourceController = $this->option('c');

        if (empty($name)) {
            return $this->error("You need to specify an object to create");
        }

        $newObject = ucfirst($name).'.php';
        $newContract = ucfirst($name).'Repository.php';
        $newConcrete = 'Eloquent'.ucfirst($name).'Repository.php';

        $this->createObjectFiles($name, $newObject, $newContract, $newConcrete);

        $this->makeBindings($newContract, $newConcrete);

        $this->makeMigration($createMigration);

        $this->makeResourceController($createResourceController);

        return $this->info('Your structure has been created');
    }
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;
    }
312718
public function handle()
    {
        /** @var \Illuminate\Database\Connection|CouchbaseConnection $connection */
        $connection = $this->databaseManager->connection($this->option('database'));
        if ($connection instanceof CouchbaseConnection) {
            $bucket = $connection->openBucket($this->argument('bucket'));
            $fields = $this->argument('fields');
            $whereClause = $this->option('where');
            $name = $this->argument('name');
            $bucket->manager()->createN1qlIndex(
                $name,
                $fields,
                $whereClause,
                $this->option('ignore'),
                $this->option('defer')
            );
            $field = implode(",", $fields);
            $this->info("created SECONDARY INDEX [{$name}] fields [{$field}], for [{$this->argument('bucket')}] bucket.");
            if ($whereClause !== '') {
                $this->comment("WHERE clause [{$whereClause}]");
            }
        }

        return;
    }
494568
public function handle()
	{
		if( ( $code = $this->argument( 'email' ) ) === null ) {
			$code = $this->ask( 'E-Mail' );
		}

		if( ( $password = $this->option( 'password' ) ) === null ) {
			$password = $this->secret( 'Password' );
		}

		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false, 'command' );
		$context->setEditor( 'aimeos:account' );

		$localeManager = \Aimeos\MShop::create( $context, 'locale' );
		$localeItem = $localeManager->bootstrap( $this->argument( 'site' ), '', '', false );
		$context->setLocale( $localeItem );

		$this->addGroups( $context, $this->createCustomerItem( $context, $code, $password ) );
	}
1185488
public function handle()
    {
        $this->events->fire('command.updating', $this);
        $this->events->fire('command.cacheconfig', $this);
        $this->events->fire('command.cacheroutes', $this);
        $this->events->fire('command.publishvendors', $this);
        $this->events->fire('command.runmigrations', $this);
        $this->events->fire('command.updatecache', $this);
        $this->events->fire('command.extrastuff', $this);
        $this->events->fire('command.updated', $this);
    }