DevCommand
class DevCommand (View source)
Constants
| PRIORITY_DEFAULT |
The priority level for default commands that are registered by the framework. |
| PRIORITY_VENDOR |
The priority level for commands that are registered by packages in the vendor directory. |
| PRIORITY_USERLAND |
The priority level for commands that are registered by the user in their application. |
Properties
| protected string|null | $color | Color of the command when output to the console. |
Methods
Create a new DevCommand instance.
Derive the name from a command string.
Get the command name.
Get the command priority.
Set the command color.
Set the command color to blue.
Set the command color to purple.
Set the command color to pink.
Set the command color to orange.
Set the command color to green.
Set the command color to yellow.
Get the command as an array.
Details
void
__construct(string $command, array $source, string|null $name = null, int $priority = self::PRIORITY_USERLAND)
Create a new DevCommand instance.
static string
nameFromCommand(string $command)
Derive the name from a command string.
string
name()
Get the command name.
int
priority()
Get the command priority.
DevCommand
color(string $color)
Set the command color.
DevCommand
blue()
Set the command color to blue.
DevCommand
purple()
Set the command color to purple.
DevCommand
pink()
Set the command color to pink.
DevCommand
orange()
Set the command color to orange.
DevCommand
green()
Set the command color to green.
DevCommand
yellow()
Set the command color to yellow.
array
toArray()
Get the command as an array.
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.