PHP code example of hegedustibor / laravel-git-version
1. Go to this page and download the library: Download hegedustibor/laravel-git-version 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/ */
hegedustibor / laravel-git-version example snippets
return [
'file-name' => 'version',
];
bash
php artisan vendor:publish --provider="TiborHegedus\GitVersion\GitVersionServiceProvider" --tag="config"
php
// Only from file
echo TiborHegedus\Facade\GitVersion::getVersionFromFile();
// Only from git
echo TiborHegedus\Facade\GitVersion::getVersionFromGit();
// Both solution
echo TiborHegedus\Facade\GitVersion::getVersion();