Parser
class Parser (View source)
Methods
Parse the given console command definition into an array.
Extract the name of the command from the expression.
Extract all parameters from the tokens.
Parse an argument expression.
Parse an option expression.
Parse the token into its token and description segments.
Details
static array
parse(string $expression)
Parse the given console command definition into an array.
static protected string
name(string $expression)
Extract the name of the command from the expression.
static protected array
parameters(array $tokens)
Extract all parameters from the tokens.
static protected InputArgument
parseArgument(string $token)
Parse an argument expression.
static protected InputOption
parseOption(string $token)
Parse an option expression.
static protected array
extractDescription(string $token)
Parse the token into its token and description segments.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.