This module allows you to run external commands and shell scripts directly from Drupal, leveraging Laravel's process capabilities. It provides a way to execute commands, capture their output and errors, and even pipe the output of one command into another.
Integrate the Laravel Processes with Drupal
use Drupal\laravel_process\Service\Process;
use Illuminate\Process\Pipe;
$result = Process::run('ls -la');
echo $result->output();
echo $result->errorOutput();
$result = Process::pipe(function (Pipe $pipe) {
$pipe->command('cat example.txt');
$pipe->command('grep -i "laravel"');
});
if ($result->successful()) {
// ...
}
Ask your assistant about Laravel Process
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 10.0.1-beta1 | Pre-release | 10–11 | Nov 15, 2024 |