Register the command.
490167
protected function registerOptimizeCommand()
    {
        $this->app->singleton('command.optimize', function ($app) {
            $app->configure('compile');

            $app['config']->set('optimizer', require_once(__DIR__.'/config/optimizer.php'));

            return new Console\OptimizeCommand(new Composer($app['files']));
        });
    }
1066161
private function registerModelMakeCommand()
    {
        $this->app->bindShared('command.make.package.model', function ($app)
        {
            return new ModelMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.model');
    }
182550
private function registerCommands()
    {
        $commands = [
            'arbory.seed' => SeedCommand::class,
            'arbory.install' => InstallCommand::class,
            'arbory.generator' => GeneratorCommand::class,
            'arbory.generate' => GenerateCommand::class
        ];

        foreach( $commands as $containerKey => $commandClass )
        {
            $this->registerCommand( $containerKey, $commandClass );
        }
    }
1102720
public function registerConsoleCommands()
    {
        $this->commands([
            \Plank\Mediable\Commands\ImportMediaCommand::class,
            \Plank\Mediable\Commands\PruneMediaCommand::class,
            \Plank\Mediable\Commands\SyncMediaCommand::class,
        ]);
    }
744606
protected function registerAdminCommand()
    {
        $this->app->singleton('command.authentication.user.admin', function ($app) {
            return $app->make(Admin::class);
        });
        $this->commands('command.authentication.user.admin');
    }
1289357
public function register()
	{
		$this->app->bindShared('command.up', function($app)
		{
			return new UpCommand;
		});

		$this->app->bindShared('command.down', function($app)
		{
			return new DownCommand;
		});

		$this->commands('command.up', 'command.down');
	}
972153
public function registerCommands()
    {
        if (! $this->app->runningInConsole()) {
            return;
        }

        foreach ($this->commands as $command) {
            $this->commands($command);
        }
    }
36857
protected function registerMakeCommand()
    {
        $this->app->singleton('command.repository.make', function ($app) {
            $prefix = $app['config']['repository.prefix'];
            $suffix = $app['config']['repository.suffix'];
            $contract = $app['config']['repository.contract'];
            $namespace = $app['config']['repository.namespace'];
            $creator = $app['repository.creator'];
            $files = $app['files'];

            return new RepositoryMakeCommand($creator, $prefix, $suffix, $contract, $namespace, $files);
        });

        $this->commands('command.repository.make');
    }
999322
public function register()
	{
		$this->app['arguments'] = function($app)
		{
			global $argv;

			// Register namespace for App commands and component commands
			// @FIXME: neither of these work yet...
			Arguments::registerNamespace('\App\Commands');
			Arguments::registerNamespace('\Components\{$1}\Cli\Commands');

			return new Arguments($argv);
		};
	}
135925
def register_command(self, name, command):
        
        if name in self.commands:
            raise RuntimeError('%s is already defined' % name)
        self.commands[name] = command
259460
private function registerPackageMakeCommand()
    {
        $this->app->bindShared('command.make.package', function ($app)
        {
            return new PackageMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package');
    }
68443
protected function registerCommands()
    {
        $this->app->singleton('command.settings.table', function ($app) {
            return new SettingsTableCommand($app['files'], $app['composer']);
        });

        $this->commands('command.settings.table');
    }
829316
private function registerArtisanCommands() {
        $this->commands([
            \BackupManager\Laravel\Laravel55DbBackupCommand::class,
            \BackupManager\Laravel\Laravel55DbRestoreCommand::class,
            \BackupManager\Laravel\Laravel55DbListCommand::class,
        ]);
    }
73959
private function registerConsoleMakeCommand()
    {
        $this->app->bindShared('command.make.package.console', function ($app)
        {
            return new ConsoleMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.console');
    }
559863
protected function registerConsoleCommands()
    {
        $this->commands([
            InfoCommand::class,
            SchemaCreateCommand::class,
            SchemaUpdateCommand::class,
            SchemaDropCommand::class,
            SchemaValidateCommand::class,
            ClearMetadataCacheCommand::class,
            ClearResultCacheCommand::class,
            ClearQueryCacheCommand::class,
            EnsureProductionSettingsCommand::class,
            GenerateProxiesCommand::class
        ]);
    }
673329
public function register(){
        //register commands
        $this->commands([
            Commands\CrudCommand::class,
            Commands\ControllerCommand::class,
            Commands\ServiceCommand::class,
            Commands\ContractCommand::class,
            Commands\ViewCommand::class,
        ]);
        //Merge config
        $this->mergeConfigFrom(
            __DIR__.'/../config/crudable.php', 'crudable'
        );
        //Load config
        $config = $this->app->make('config');
        //Check for auto binding
        if($config->get('crudable.use_auto_binding')){
            //Run contextual binding first
            foreach($config->get('crudable.implementations') as $usage){
                $this->app->when($usage['when'])
                    ->needs(isset($usage['needs'])?$usage['needs']:\Flobbos\Crudable\Contracts\Crud::class)
                    ->give($usage['give']);
            }
            //Run fixed bindings
            foreach($config->get('crudable.bindings') as $binding){
                $this->app->bind($binding['contract'],$binding['target']);
            }
        }
    }
220800
public function register()
    {

        // Package commands available for laravel or lumen higher than 5.1

        if(version_compare($this->app->version(), '5.1', ">=") or starts_with($this->app->version(), "Lumen")) {

            if ($this->app->runningInConsole()) {

                // Registering commands

                $this->commands([
                    ListIndicesCommand::class,
                    CreateIndexCommand::class,
                    UpdateIndexCommand::class,
                    DropIndexCommand::class,
                    ReindexCommand::class
                ]);

            }
        }

        $this->app->bind('es', function () {
            return new Connection();
        });
    }