execute shell script file in laravel command
use SymfonyComponentProcessProcess;
use SymfonyComponentProcessExceptionProcessFailedException;
$process = new Process('sh /folder_name/file_name.sh');
$process->run();
// executes after the command finishes
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
echo $process->getOutput();