PHPackages                             codeuptime/app-version-laravel - 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. codeuptime/app-version-laravel

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

codeuptime/app-version-laravel
==============================

Access your application version in Laravel

1.4.1(2y ago)010.3kMITPHP

Since Jan 29Pushed 2y agoCompare

[ Source](https://github.com/CodeUptime/app-version-laravel)[ Packagist](https://packagist.org/packages/codeuptime/app-version-laravel)[ RSS](/packages/codeuptime-app-version-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

app-version-laravel
===================

[](#app-version-laravel)

[![Packagist](https://camo.githubusercontent.com/a5f9bb80f6217595bc3a55a719edcaebe090a6b14eeeb96b04afe7803e4aff5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6465757074696d652f6170702d76657273696f6e2d6c61726176656c2e737667)](https://packagist.org/packages/codeuptime/app-version-laravel) [![License](https://camo.githubusercontent.com/6b53097f643981fa2cc860e7136fc092bc0cb51e3bd80af6dd026fe3011dc269/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f6465757074696d652f6170702d76657273696f6e2d6c61726176656c2e737667)](https://packagist.org/packages/codeuptime/app-version-laravel) [![Test](https://github.com/CodeUptime/app-version-laravel/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/CodeUptime/app-version-laravel/actions/workflows/test.yml)

This package makes it easy to access current app version information if your Laravel application at runtime.

This can be helpful when you want/need to:

- inlcude app version number in logs
- include app version in API responses
- show the current app version to your users
- ...

Pre-Requisites
--------------

[](#pre-requisites)

This package relies on current version information being saved in the `composer.json` or `package.json` files under the `version` key.

If you are not currently setting the version of your application in any of these files as part of your CI/CD workflows, you can follow this tutorial to get started: [Automatic Version Tagging using Github Actions](https://medium.com/one-weekend-at-a-time/semantic-commit-messages-and-automatic-version-tagging-in-github-actions-184a82a7a827)

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

```
composer require codeuptime/app-version-laravel

```

### Configre App Service Provider

[](#configre-app-service-provider)

The package should be included in your application automatically using Laravel's package auto-discovery functionality. If this does not work, you can always add the service provider manually to your `config/app.php`

```
// 'config/app.php'
