2019-12-03 15:41:56 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Utilities;
|
|
|
|
|
|
|
|
use Symfony\Component\Process\Process;
|
|
|
|
|
|
|
|
class Console
|
|
|
|
{
|
|
|
|
public static function run($command)
|
|
|
|
{
|
|
|
|
$process = new Process($command, base_path());
|
|
|
|
|
|
|
|
$process->run();
|
|
|
|
|
|
|
|
if ($process->isSuccessful()) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-12-15 15:16:03 +03:00
|
|
|
return $process->getErrorOutput();
|
2019-12-03 15:41:56 +03:00
|
|
|
}
|
|
|
|
}
|