src/Core/Console/Kernel.php
public function command($signature, \Closure $callback)
    {
        $command = new ClosureCommand($signature, $callback);

        Console::starting(function ($console) use ($command) {
            $console->add($command);
        });

        return $command;
    }
public function command($signature, \Closure $callback)
    {
        $command = new ClosureCommand($signature, $callback);

        Console::starting(function ($console) use ($command) {
            $console->add($command);
        });

        return $command;
    }
public function command ( $ signature , \ Closure $ callback ) { $ command = new ClosureCommand ( $ signature , $ callback ) ; Console :: starting ( function ( $ console ) use ( $ command ) { $ console -> add ( $ command ) ; } ) ; return $ command ; }
Register a closure based command with the application.

@param string   $signature
@param \Closure $callback

@return ClosureCommand
Register a closure based command with the application .