Skip to content

Is adding command explicitly required? #109

@jeroendelau

Description

@jeroendelau

I tried to add a Horizon Command, but I was not able to get it to run. It said "unable to find command". The command are available from the command line.

After explicitly registering the command in console/Kernel.php I was able to run them.

IE:

 protected function commands()
    {
        $this->load(__DIR__.'/Commands');
        $this->load(__DIR__.'/Commands');

        $this->registerCommand(app( PurgeCommand::class));
        $this->registerCommand(new ClearCommand());
        $this->registerCommand(app( PauseCommand::class));
        $this->registerCommand(app( ContinueCommand::class));
        
        require base_path('routes/console.php');
    }

Is this as intended? If so, we can add this to the README, happy to send in a PR if that is the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions