Define a CLI command using a string expression and a callable.
public command ( string $expression, callable | string | array $callable, array $aliases = [] ) : |
||
$expression | string | Defines the arguments and options of the command. |
$callable | callable | string | array | Called when the command is called. When using a container, this can be a "pseudo-callable" i.e. the name of the container entry to invoke. |
$aliases | array | An array of aliases for the command. |
return |