Register the command.

@param string $command
@return void
506576
protected function registerMakeModelCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\ModelMakeCommand($app);
        });
    }
769269
public function command(ConsoleCommandEvent $event)
    {
        /** @var BridgeCommand $command */
        $command = $event->getCommand();

        if (!in_array($command->getName(), $this->getSupportedCommands())) {
            return;
        }

        $command->setRegistry($this->registry);
    }
1152677
private function registerCommand($class, $command)
    {
        $this->app->singleton($this->commandPath . $command, function ($app) use ($class) {
            return $app[$class];
        });

        $this->commands($this->commandPath . $command);
    }
1311258
public function add(Command $command)
    {
        $name = $command->getName();

        $this->commands[$name] = $command;

        if ($shortName = $command->getShortName()) {
            $this->shortNameIndex[$shortName] = $name;
        }

        foreach ($command->getAliases() as $alias) {
            $this->aliasIndex[$alias] = $name;
        }

        ksort($this->aliasIndex);
    }
766367
protected function registerCommands(): void
    {
        // Register artisan commands
        foreach ($this->commands as $key => $value) {
            $this->app->singleton($value, $key);
        }

        $this->commands(array_values($this->commands));
    }
702697
protected function registerCommands(array $commands)
	{
		if (!$this->app->runningInConsole()) {
			return;
		}

		foreach ($commands as $key => $command) {
			if (is_numeric($key)) {
				$key = Str::lower(str_replace("\\", '.', $command));
			}

			$method = "register{$command}";

			try {
				if (method_exists($this, $method)) {
					call_user_func_array([$this, $method], [$key]);
				} else {
					$this->app->singleton($key, function ($app) use ($command) {
						return $app->make($command);
					});
				}
				$this->commands($key);
			} catch (\Exception $e) {
				throw $e;
			}
		}
	}
317922
public function register()
    {
        foreach ($this->commands as $binding => $command) {
            $bind    = $this->prefix . $binding;
            $command = '\\' . $this->namespace . '\\' . $command . $this->commandSuffix;
            unset($this->commands[ $binding ]);
            $this->commands[ $bind ] = $command;
            $this->app->singleton($bind, $command);
        }

        $this->commands(array_keys($this->commands));
    }
237569
public function registerCommands()
    {
        foreach ($this->commandsStack as $key => $command) {
            $this->resolveConsoleCommand('\\'.$command);
        }

        return $this;
    }
153382
protected function registerCommands(array $commands)
    {
        foreach (array_keys($commands) as $command) {
            call_user_func_array([$this, "register{$command}Command"], []);
        }

        $this->commands(array_values($commands));
    }
1351478
public function handle($command)
    {
        $this->commandStack[] = $command;

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

        $first = true;

        while ($command = array_shift($this->commandStack)) {
            $this->invokeHandler($command, $first);
            $first = false;
        }
    }
560644
protected function dispatch(string $command): void
    {
        $console = $this->testbench->artisan($command, $this->options);

        if ($console instanceof PendingCommand) {
            $console->run();
        }
    }
392825
protected function registerDatabaseAgainCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\DatabaseAgainCommand($app);
        });
    }
1244227
public function registerCommands(Console $console)
    {
        $commands = (array) $this->get('console.commands');

        foreach ($commands as $class) {
            if (class_exists($class) && is_subclass_of($class, Command::class)) {
                $console->addCommand($this->container->createObject($class));
            }
        }
    }
346693
protected function registerDatabaseUpgradeCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\DatabaseUpgradeCommand($app);
        });
    }
553005
protected function registerCommands()
    {
        ensure_trait_used_in_subclass_of_or_fail(self::class, $this, ServiceProvider::class);

        foreach (array_keys($this->commands) as $command) {
            $method = "register{$command}Command";
            call_user_func_array([$this, $method], []);
        }
        $this->commands(array_values($this->commands));
    }
104186
public function registerCommands(){

        foreach($this->commands as $name => $class){

            $dotName = str_replace(':', '.', $name);

            $this->app['command.'.$dotName] = $this->app->share(function() use ($class)
            {
                $commandClassName = $class;
                return new $commandClassName();
            });

            $this->commands('command.'.$dotName);
        }
    }
833449
protected function registerDatabaseCleanCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\DatabaseCleanCommand($app);
        });
    }