I'm trying to use envoy from laravel to call some scripts on my server. Right now I'm doing it with a virtual machine installed on my mac.
I'm trying to run my envoy scripts from a controller as follow:
function __construct()
{
$command = "/Users/test_user/.composer/vendor/bin/envoy run test --filename=new_folder"
$process = new Process($command);
$process->start();
foreach ($process as $type => $data) {
if ($process::OUT === $type) {
echo "\nRead from stdout: ".$data;
} else { // $process::ERR === $type
echo "\nRead from stderr: ".$data;
}
}
exit();
}
Now when let this run I get the following response:
Read from stdout: Valet requires Homebrew to be installed on your Mac.
If I open my terminal and run: which brew
which brew
/usr/local/bin/brew
and my $PATH
/Users/test_user/Android/platform-tools:/Users/test_user/Android/tools:~/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin alias numFiles='echo 14'
I'm not exactly sure why this seems to fail?
Valet was installed with the composer global require laravel/valet
command, and was not installed locally for the project.
Is there any way of fixing this?