Package Data | |
---|---|
Maintainer Username: | bluora |
Maintainer Contact: | rocco@hnh.digital (Rocco Howard) |
Package Create Date: | 2016-08-13 |
Package Last Update: | 2022-10-28 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:03:37 |
Package Statistics | |
---|---|
Total Downloads: | 11,772 |
Monthly Downloads: | 109 |
Daily Downloads: | 2 |
Total Stars: | 4 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 1 |
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
Provides a wrapper for getting info from GIT.
Via composer:
$ composer require hnhdigital-os/laravel-git-info ~1.0
Enable the facade by editing config/app.php:
'aliases' => [
...
'Git' => Bluora\LaravelGitInfo\Facade::class,
...
];
The service provider will autoload from Laravel 5.5.
To enable the service provider in versions prior to Laravel 5.4, edit the config/app.php:
Enable the service provider by editing config/app.php:
'providers' => [
...
Bluora\LaravelGitInfo\ServiceProvider::class,
...
];
Current version. Eg 'de83088-dirty'.
echo Git::version();
Current branch. Eg 'master'.
echo Git::branch();
Current total commits. Eg 7.
echo Git::commits();
Commit difference between current branch and master.
Optional arguments include specifying a branch and returning a text version.
echo Git::commitsBehind($branch = 'master', $return_text = true);
use Bluora\LaravelGitInfo\GitInfo;
echo (new GitInfo())->version();
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.