Execute the console command.

@return void
970452
public function fire()
    {
        if (! class_exists($model = $this->argument('model')))
        {
            throw new \InvalidArgumentException('Model does not exist!');
        }

        $this->generator->make(
            $model,
            $this->option('method'),
            $this->option('html')
        );
    }
619561
public function handle()
    {
        do {
            if (!isset($validator) || $validator->errors()->has("username")) {
                if (isset($validator) && $validator->errors()->has("username")) {
                    $this->error($validator->errors()->first("username"));
                }
                $data["username"] = $this->ask("User's username: ");
            }

            if (!isset($validator) || $validator->errors()->has("firstname")) {
                if (isset($validator) && $validator->errors()->has("firstname")) {
                    $this->error($validator->errors()->first("firstname"));
                }
                $data["firstname"] = $this->ask("User's firstname: ");
            }

            if (!isset($validator) || $validator->errors()->has("lastname")) {
                if (isset($validator) && $validator->errors()->has("lastname")) {
                    $this->error($validator->errors()->first("lastname"));
                }
                $data["lastname"] = $this->ask("User's lastname: ");
            }

            if (!isset($validator) || $validator->errors()->has("email")) {
                if (isset($validator) && $validator->errors()->has("email")) {
                    $this->error($validator->errors()->first("email"));
                }
                $data["email"] = $this->ask("User's email: ");
                $data["email_confirmation"] = $this->ask("Email again: ");
            }

            if (!isset($validator) || $validator->errors()->has("password")) {
                if (isset($validator) && $validator->errors()->has("password")) {
                    $this->error($validator->errors()->first("password"));
                }
                $data["password"] = $this->secret("User's password: ");
                $data["password_confirmation"] = $this->secret("Password again: ");
            }

            $validator = new Validator;

            $validator = Validator::make($data, [
                'username' => 'required',
                'firstname' => 'required',
                'lastname' => 'required',
                'email' => 'required|unique:admin_users,email|confirmed',
                'password' => 'required|confirmed'
            ]);
        } while ($validator->fails());

        $user = new AdminUser;
        $user->username = $data["username"];
        $user->firstname = $data["firstname"];
        $user->lastname = $data["lastname"];
        $user->email = $data["email"];
        $user->is_active = true;
        $user->password = bcrypt($data["password"]);
        $user->save();

        $user->addRoleByName('administrator');
    }
293978
public function handle()
    {
        if ($this->option('all')) {
            $this->publishCommonViews();
            $this->publishAPIRoutes();
            $this->initAPIRoutes();
            $this->publishTemplates();
            $this->publishAppBaseController();
        } elseif ($this->option('templates')) {
            $this->publishTemplates();
        } elseif ($this->option('baseController')) {
            $this->publishAppBaseController();
        } else {
            $this->publishCommonViews();
            $this->publishAPIRoutes();
            $this->initAPIRoutes();
        }
    }
1291843
public function handle()
    {

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

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

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

        foreach ($indices as $index) {

            if (!$client->indices()->exists(['index' => $index])) {
                $this->warn("Index: {$index} is not exist!");
                continue;
            }

            if ($force or $this->confirm("Are you sure to drop \"$index\" index")) {

                $this->info("Dropping index: {$index}");

                $client->indices()->delete(['index' => $index]);

            }

        }

    }
696729
public function handle()
    {
        $theme = strtolower($this->argument('name'));

        $this->installTheme($theme);
        $this->setupTheme($theme);

        if ($this->option('default')) {
            $this->setAsDefaultTheme($theme);
        }

        $this->info('Theme ['.$theme.'] installed.');
    }
755843
public function handle(): void
    {
        $this->dbMigrate();
        $this->populateReactionTypes();
        $this->populateReacters();
        $this->populateReactants();
        $this->populateReactions();
        $this->dbCleanup();
        $this->filesystemCleanup();
    }
126294
public function handle()
    {
        $this->identifier = self::normalize($this->argument('identifier'));

        $this->askImageUploads();
        $this->askFileUploads();
        $this->askMigration();
        $this->askActions();

        $this->compiler = new ResourceCompiler($this, $this->identifier, $this->resourceOptions);

        $this->createResource('config');
        $this->createResource('model');
        $this->createResource('request');
        $this->createResource('controller');

        if ($this->resourceOptions['migration']) {
            $this->createResource('migration');
        }
    }
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');
    }
985381
public function handle()
    {
        $name = $this->parseNameForDirectory($this->argument('name'));

        $headers = $this->generatePluginHeaders($name);

        $this->installPlugin($name);
        $this->setPluginHeaders($name, $headers);
        $this->setPluginRootFile($name);
        $this->setConfigurationFile($name, $headers);
        $this->setTranslationFile($name, $headers);
        $this->setProviders($name, $headers);

        $this->info('Plugin installed successfully.');
    }
150941
public function handle()
    {
        $name = $this->parseName($this->getNameInput());

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

        if ($this->alreadyExists($this->getNameInput())) {
            $this->error($this->type . " \"{$name}\" already exists!");

            return;
        }

        if (! $this->checkOptions()) {
            return;
        }

        $this->makeDirectory($path);

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

        $this->info($this->type . " \"{$name}\" created successfully.");

        // If also needs a new model file
        if ($model = $this->option('create')) {
            $this->call('make:model', ['name' => $model]);
        }
    }
1099043
public function handle()
    {
        $email     = $this->argument('username') ?: $this->ask('Enter username (email address)');
        $firstName = $this->option('firstName') ?: $this->ask('Enter first name');
        $lastName  = $this->option('lastName') ?: $this->ask('Enter last name');

        if ( ! ($password = $this->argument('password'))) {
            // @codeCoverageIgnoreStart
            do {
                $password        = $this->secret('Enter password');
                $passwordConfirm = $this->secret('Confirm password');

                if ($password !== $passwordConfirm) {
                    $this->error('Passwords do not match. Try again.');
                    $password = null;
                }

            } while (empty($password));
            // @codeCoverageIgnoreEnd
        }

        $user = $this->getAuthenticator()->createUser($email, $password, [
            'first_name' => $firstName,
            'last_name'  => $lastName,
        ]);

        if ( ! $user) {
            $this->error('Failed to create user!');
        }

        if ($this->option('admin')) {
            $user->is_superadmin = true;
            $user->save();
        }

        $this->info('User created.');
    }
1362326
public function handle()
    {
        $this->info('Generating optimized class loader');

        $this->laravel->configure('optimizer');

        $this->composer->dumpAutoloads('--no-dev --optimize');

        if ($this->option('force') || !env('APP_DEBUG')) {
            $this->info('Compiling common classes');

            $this->compileClasses();
        } else {
            $this->call('clear-compiled');
        }
    }
629587
public function handle()
    {
        $name = $this->ask('Name', 'Administrator');
        $email = $this->ask('Email', 'admin@example.com');
        $password = $this->ask('Password', 'secret');

        $data = $this->prepareData($name, $email, $password);

        $this->tryUpdatingRole($this->createUserInstance($data));
    }
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);
        }
    }
987183
public function handle()
    {
        $connection = $this->getConnection();
        $schema = $this->getSchema($connection);
        $table = $this->getTable();

        // Check whether we just need to generate one table
        if ($table) {
            $this->models->on($connection)->create($schema, $table);
            $this->info("Check out your models for $table");
        }

        // Otherwise map the whole database
        else {
            $this->models->on($connection)->map($schema);
            $this->info("Check out your models for $schema");
        }
    }
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);
        }
    }
727286
public function handle()
    {
        $table = trim($this->input->getArgument('table_name'));
        $name = "create_{$table}_table";

        $this->writeMigration($name, $table);

        $this->composer->dumpAutoloads();
    }