Did you ever need to invoke an external program from within your Laravel/PHP application? It handles all the logic related to running processes as well as knowing about their output, errors, and execution state.
$result = Process::run('git status'); echo $result->output(); If you prefer to use the array syntax to build all elements of your process string, you can do this as well.
you can also fake process calls by calling the fake method on the process facade. Process::fake(); Process::run('git status'); Process::assertRan('git status'); This call is going to fake all of the processes that you would invoke through the new process facade.