I’m working with Laravel 11 and need to programmatically execute the “ping” command and get the result. I’m using Laravel Sail. But when I attempt to use the Process
facade I get an error:
“sh: 1: ping: not found
” // app/Livewire/Site/Forms/Tools/ToolForm.php:48
$result = Process::run('ping -c 3 google.com');
dd($result->errorOutput());
How can I achieve this?