class ProcessResult implements ProcessResult (View source)
| protected Process | $process | The underlying process instance. |
| void | __construct(Process $process)
Create a new process result instance. | |
| string | command()
Get the original command executed by the process. | |
| bool | successful()
Determine if the process was successful. | |
| bool | failed()
Determine if the process failed. | |
| int|null | exitCode()
Get the exit code of the process. | |
| string | output()
Get the standard output of the process. | |
| bool | seeInOutput(string $output)
Determine if the output contains the given string. | |
| string | errorOutput()
Get the error output of the process. | |
| bool | seeInErrorOutput(string $output)
Determine if the error output contains the given string. | |
| $this | throw(callable|null $callback = null)
Throw an exception if the process failed. | |
| $this | throwIf(bool $condition, callable|null $callback = null)
Throw an exception if the process failed and the given condition is true. |
Create a new process result instance.
Get the original command executed by the process.
Determine if the process was successful.
Determine if the process failed.
Get the exit code of the process.
Get the standard output of the process.
Determine if the output contains the given string.
Get the error output of the process.
Determine if the error output contains the given string.
Throw an exception if the process failed.
Throw an exception if the process failed and the given condition is true.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Process/ProcessResult.html