Execute the console command.

@return null
15582
public function handle()
    {
        $contents = $this->getKeyFile();

        $dbName = $this->argument('database');

        $dbAddress = $this->ask('What is your MySQL address?', '127.0.0.1');

        $dbPort = $this->ask('What is your MySQL port?', '3306');

        $dbUserName = $this->ask('What is your MySQL username?', 'root');

        $question = new Question('What is your MySQL password?', '<none>');
        $question->setHidden(true)->setHiddenFallback(true);
        $dbPassword = (new SymfonyQuestionHelper())->ask($this->input, $this->output, $question);
        if ($dbPassword === '<none>') {
            $dbPassword = '';
        }

        // Update DB credentials in .env file.
        $search = [
            '/('.preg_quote('DB_HOST=').')(.*)/',
            '/('.preg_quote('DB_PORT=').')(.*)/',
            '/('.preg_quote('DB_DATABASE=').')(.*)/',
            '/('.preg_quote('DB_USERNAME=').')(.*)/',
            '/('.preg_quote('DB_PASSWORD=').')(.*)/',
        ];
        $replace = [
            '${1}'.$dbAddress,
            '${1}'.$dbPort,
            '${1}'.$dbName,
            '${1}'.$dbUserName,
            '${1}'.$dbPassword,
        ];
        $contents = preg_replace($search, $replace, $contents);

        if (!$contents) {
            throw new Exception('Error while writing credentials to .env file.');
        }

        // Set DB username and password in config
        $this->laravel['config']['database.connections.mysql.host'] = $dbAddress;
        $this->laravel['config']['database.connections.mysql.port'] = $dbPort;
        $this->laravel['config']['database.connections.mysql.username'] = $dbUserName;
        $this->laravel['config']['database.connections.mysql.password'] = $dbPassword;

        // Clear DB name in config
        unset($this->laravel['config']['database.connections.mysql.database']);

        // Force the new login to be used
        DB::purge();

        // Create database if not exists
        DB::unprepared('CREATE DATABASE IF NOT EXISTS `'.$dbName.'`');
        DB::unprepared('USE `'.$dbName.'`');
        DB::connection()->setDatabaseName($dbName);

        // Migrate DB
        if (Schema::hasTable('migrations')) {
            $this->error('A migrations table was found in database ['.$dbName.'], no migration and seed were done.');
        } else {
            $this->call('migrate');
            $this->call('db:seed');
        }

        // Write to .env
        $this->files->put('.env', $contents);
    }
347542
public function fire()
    {
        $name = $this->ask('Name : ');
        $email = $this->ask('Email : ');
        $password = $this->secret('Password : ');

        $user = User::firstOrcreate(compact('name', 'email', 'password'));

        $this->line('Select role:');

        foreach (Role::all() as $role) {
            $this->line($role->id.'. '.$role->name);
        }

        $role = $this->ask('Role number : ');

        $user->addRole($role);

        $this->info("User [{$user->name}] created successfully.");
    }
1293572
public function handle()
    {
        if ($this->shouldBeFailed()) {
            return;
        }

        $database = $this->config['database'] ?? null;
        $migrator = $this->resolveMigrator();

        if (! $this->shouldBeDelayed()) {
            $migrator->runInstall($this->model, $database);
            $migrator->runUp($this->model, $database);

            $this->delete();
        }
    }
1143649
public function handle()
    {
        try {
            $this->filesystem->make(
                $path = resource_path('views/' . $this->viewPath()),
                $this->filesystem->get($this->getStubPath()),
                true
            );
            $this->info('File ' . $path . ' created');
        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
    }
247443
public function handle()
    {
        $username = $this->argument('username');

        if ( ! $this->getAuthenticator()->deleteUser($username)) {
            $this->error("Failed to find or delete user '{$username}'");
            return;
        }

        $this->info('User deleted.');
    }
1371808
public function handle()
    {
        $name = $this->argument('name');

        $error = $this->validateName($name);

        if ($error) {
            $this->error($error);
            return;
        }

        $apiKey       = new ApiKey;
        $apiKey->name = $name;
        $apiKey->key  = ApiKey::generate();
        $apiKey->save();

        $this->info('API key created');
        $this->info('Name: ' . $apiKey->name);
        $this->info('Key: '  . $apiKey->key);
    }
1309018
public function handle()
    {
        $name = $this->argument('name');
        $path = $this->getPath($name);

        $this->makeDirectory($path);

        if (file_exists($path)) {
            if ($this->confirm('View already exists. Do you wish to overwrite it?')) {
                $this->createView($path);
            }
        } else {
            $this->createView($path);
        }     
    }
437983
public function handle()
    {
        $this->module = $this->laravel['modules'];

        $name = $this->argument('module');

        if (!empty($name)) {
            $this->reset($name);

            return;
        }

        foreach ($this->module->getOrdered($this->option('direction')) as $module) {
            $this->line('Running for module: <info>' . $module->getName() . '</info>');

            $this->reset($module);
        }
    }
838478
public function handle()
    {

        // $this->info($this->option('language'));

        $locales = Config::get('app.locales');

        if($this->option('file') != null)
        {
            $file = base_path('resources/lang/en/'.$this->option('file'));

            foreach ($locales as $localeKey => $value) 
            {
                if($localeKey != 'en')
                {
                   $this->translate($localeKey,$file);
                }
            }   
        }
        else
        {
            $files = File::allFiles(base_path('resources/lang/en'));
            foreach ($files as $file)
            {   
                if($this->option('language') != null)
                {
                    $this->translate($this->option('language'),$file);
                }
                else
                {
                    foreach ($locales as $localeKey => $value) 
                    {
                        if($localeKey != 'en')
                        {
                           $this->translate($localeKey,$file);
                        }
                    
                    }    
                }
            }
        }
        
    }
1040327
public function handle()
    {

        $this->setConfig();

        $this->checkRequirements();

        if ( $this->InsertChartIntoFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

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


    }
1354288
public function handle()
    {
        $group = $this->input->getArgument('group');

        if (is_null($group)) {
            return $this->publish();
        }

        $groups = explode(',', $group);

        foreach($groups as $group) {
            $this->publish($group);
        }
    }
1276575
public function fire()
    {
        $module = $this->laravel['modules']->findOrFail($this->argument('module'));

        if ($module->enabled()) {
            $module->disable();

            $this->info("Module [{$module}] disabled successful.");
        } else {
            $this->comment("Module [{$module}] has already disabled.");
        }
    }
757931
public function handle()
    {
        $name = $this->argument('module');

        if ($name) {
            $this->updateModule($name);

            return;
        }

        /** @var \Nwidart\Modules\Module $module */
        foreach ($this->laravel['modules']->getOrdered() as $module) {
            $this->updateModule($module->getName());
        }
    }
725688
public function handle()
    {
        $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]);
        $this->call('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client']);
        $this->call('passport:client', ['--password' => true, '--name' => config('app.name').' Password Grant Client']);
    }
53484
public function handle()
    {
        if ($package = $this->option('package')) {
            $this->manager->setPathToVendorPackage($package);
        }

        $this->files = $this->manager->files();

        if (empty($this->files)) {
            $this->warn('No language files were found!');
        }

        $languages = $this->manager->languages();

        $this->table(
            array_merge(['key'], $languages),
            $this->tableRows()
        );
    }
736931
public function handle()
    {
        if (count($this->models) === 0) {
            return;
        }

        $this->models->first()->searchableUsing()->update($this->models);
    }
159578
public function handle()
    {
        $name = $this->argument('name');
        $readableName = $this->argument('readableName');
        $userId = $this->option('user');
        $roleName = $this->option('role');

        $permission = $this->createPermission($name, $readableName);

        if ($userId) {
            $this->attachPermissionToUser($permission, $userId);
        }

        if ($roleName) {
            $this->attachPermissionToRole($permission, $roleName);
        }
    }