PHPackages                             connorhowell/laravel-git-version - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. connorhowell/laravel-git-version

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

connorhowell/laravel-git-version
================================

Retrieve current verison information about the app in the form of a git commit hash

v1.0.1(10mo ago)13281[3 PRs](https://github.com/ConnorHowell/laravel-git-version/pulls)MITPHPPHP ^8.0CI passing

Since Jul 1Pushed 2mo agoCompare

[ Source](https://github.com/ConnorHowell/laravel-git-version)[ Packagist](https://packagist.org/packages/connorhowell/laravel-git-version)[ Docs](https://github.com/connorhowell/laravel-git-version)[ GitHub Sponsors]()[ RSS](/packages/connorhowell-laravel-git-version/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (6)Used By (0)

Laravel Git Version
===================

[](#laravel-git-version)

[![Latest Version on Packagist](https://camo.githubusercontent.com/13665fc914f91d95b9859098ae44a8f96dfa8a83c0bf1e30045c9d5096e38e24/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e6e6f72686f77656c6c2f6c61726176656c2d6769742d76657273696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/connorhowell/laravel-git-version)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9a4916b0435b557457e34d714cf7b0e6bade889b004191cecc40f236b347c60e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f6e6e6f72686f77656c6c2f6c61726176656c2d6769742d76657273696f6e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/connorhowell/laravel-git-version/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/22f44a6d6b94ad213b66a02eb1355fafbc7562d726b72632fb660a21162a87b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e6e6f72686f77656c6c2f6c61726176656c2d6769742d76657273696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/connorhowell/laravel-git-version)

A Laravel package that provides easy access to Git version information for your application. This package allows you to retrieve the current Git commit hash, repository URL, and a direct link to the current commit, which can be useful for deployment tracking, debugging, and displaying version information in your application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require connorhowell/laravel-git-version
```

The package will automatically register its service provider.

Usage
-----

[](#usage)

You can use this package in two ways: via the Facade or by directly using the class.

### Using the Facade

[](#using-the-facade)

```
use ConnorHowell\LaravelGitVersion\Facades\LaravelGitVersion;

// Get all version information
$versionInfo = LaravelGitVersion::getVersionInfo();
// Returns: ['version' => 'abc123...', 'repo' => 'https://github.com/user/repo', 'commit_url' => 'https://github.com/user/repo/commit/abc123...']

// Get just the current commit hash
$commitHash = LaravelGitVersion::getCurrentGitCommitHash();

// Get the repository URL
$repoUrl = LaravelGitVersion::getGitUrl();

// Get the URL to the current commit
$commitUrl = LaravelGitVersion::getCurrentCommitUrl();
```

### Direct Usage

[](#direct-usage)

```
use ConnorHowell\LaravelGitVersion\LaravelGitVersion;

// Get all version information
$versionInfo = LaravelGitVersion::getVersionInfo();

// Get the URL to the current commit
$commitUrl = LaravelGitVersion::getCurrentCommitUrl();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Connor Howell](https://github.com/ConnorHowell)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance73

Regular maintenance activity

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcd4cedd5abf8f7b30732bdbf3c39162e7faebde3bc68681bd08a2004abd203c?d=identicon)[ConnorHowell](/maintainers/ConnorHowell)

---

Top Contributors

[![ConnorHowell](https://avatars.githubusercontent.com/u/4037845?v=4)](https://github.com/ConnorHowell "ConnorHowell (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravellaravel-git-versionConnor Howell

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/connorhowell-laravel-git-version/health.svg)

```
[![Health](https://phpackages.com/badges/connorhowell-laravel-git-version/health.svg)](https://phpackages.com/packages/connorhowell-laravel-git-version)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
