1. Go to this page and download the library: Download gaiththewolf/git-manager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gaiththewolf / git-manager example snippets
namespace App\Http\Controllers;
use GitManager;
class UpdaterController extends Controller
{
public function __construct()
{
// init and set git working directory
GitManager::init(base_path());
}
public function index()
{
$version = GitManager::version(); // get string of installed git version
$version = trim(str_replace("git version", "",$version));
$lastUpdate = trim(GitManager::lastUpdate()); // get string of last update datetime
$status = GitManager::status(); // get Object git status }