Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Symfony\Component\Process\Process;
- Route::get('test',function(){
- $process = new Process('sudo apt-get update');
- $process->run();
- // executes after the command finishes
- if (!$process->isSuccessful()) {
- throw new ProcessFailedException($process);
- }
- echo $process->getOutput();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement