18 lines
398 B
PHP
18 lines
398 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Process\Pipe;
|
|
use Illuminate\Support\Facades\Process;
|
|
|
|
class GitPullController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$result = Process::path(base_path())->run('bash git_pull.sh');
|
|
|
|
return $result->successful() ? '<pre>'.$result->output().'</pre>' : $result->errorOutput();
|
|
}
|
|
}
|