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

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.

color(string $color)

Set the command color.

blue()

Set the command color to blue.

purple()

Set the command color to purple.

pink()

Set the command color to pink.

orange()

Set the command color to orange.

green()

Set the command color to green.

yellow()

Set the command color to yellow.

array
toArray()

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.

Parameters

string $command
array $source
string|null $name
int $priority

Return Value

void

static string nameFromCommand(string $command)

Derive the name from a command string.

Parameters

string $command

Return Value

string

string name()

Get the command name.

Return Value

string

int priority()

Get the command priority.

Return Value

int

DevCommand color(string $color)

Set the command color.

Parameters

string $color

Return Value

DevCommand

DevCommand blue()

Set the command color to blue.

Return Value

DevCommand

DevCommand purple()

Set the command color to purple.

Return Value

DevCommand

DevCommand pink()

Set the command color to pink.

Return Value

DevCommand

DevCommand orange()

Set the command color to orange.

Return Value

DevCommand

DevCommand green()

Set the command color to green.

Return Value

DevCommand

DevCommand yellow()

Set the command color to yellow.

Return Value

DevCommand

array toArray()

Get the command as an array.

Return Value

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.