PHP code example of hnhdigital-os / laravel-git-info

1. Go to this page and download the library: Download hnhdigital-os/laravel-git-info 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/ */

    

hnhdigital-os / laravel-git-info example snippets


    'aliases' => [
        ...
        'Git' => Bluora\LaravelGitInfo\Facade::class,
        ...
    ];

    'providers' => [
        ...
        Bluora\LaravelGitInfo\ServiceProvider::class,
        ...
    ];

echo Git::version();

echo Git::branch();

echo Git::commits();

echo Git::commitsBehind($branch = 'master', $return_text = true);

echo Git::submoduleStatus();

use Bluora\LaravelGitInfo\GitInfo;

echo (new GitInfo())->version();