W3cubDocs

/Laravel 8

CallsCommands

trait CallsCommands (View source)

Methods

Command resolveCommand(Command|string $command)

Resolve the console command instance for the given command.

int call(Command|string $command, array $arguments = [])

Call another console command.

int callSilent(Command|string $command, array $arguments = [])

Call another console command silently.

int runCommand(Command|string $command, array $arguments, OutputInterface $output)

Run the given the console command.

ArrayInput createInputFromArguments(array $arguments)

Create an input instance from the given arguments.

array context()

Get all of the context passed to the command.

Details

abstract protected Command resolveCommand(Command|string $command)

Resolve the console command instance for the given command.

Parameters

Command|string $command

Return Value

Command

int call(Command|string $command, array $arguments = [])

Call another console command.

Parameters

Command|string $command
array $arguments

Return Value

int

int callSilent(Command|string $command, array $arguments = [])

Call another console command silently.

Parameters

Command|string $command
array $arguments

Return Value

int

protected int runCommand(Command|string $command, array $arguments, OutputInterface $output)

Run the given the console command.

Parameters

Command|string $command
array $arguments
OutputInterface $output

Return Value

int

protected ArrayInput createInputFromArguments(array $arguments)

Create an input instance from the given arguments.

Parameters

array $arguments

Return Value

ArrayInput

protected array context()

Get all of the context passed to the command.

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Console/Concerns/CallsCommands.html