PHPackages                             jiejunf/laravel-version-service - 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. [API Development](/categories/api)
4. /
5. jiejunf/laravel-version-service

ActiveLibrary[API Development](/categories/api)

jiejunf/laravel-version-service
===============================

v0.7.1(6y ago)390MITPHPPHP &gt;=7

Since Jun 21Pushed 6y agoCompare

[ Source](https://github.com/jiejunf/laravel-version)[ Packagist](https://packagist.org/packages/jiejunf/laravel-version-service)[ RSS](/packages/jiejunf-laravel-version-service/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (12)Used By (0)

app version provider for Laravel 5
==================================

[](#app-version-provider-for-laravel-5)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6c99614a2a068b26b939d955b5e6a1dd11c50eb1375dbd035ab6513fb4b3196/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d76302e362d626c75652e737667)](https://packagist.org/packages/jiejunf/laravel-version-service)[![Software License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Total Size](https://camo.githubusercontent.com/f8bd46cb9353fe7da05685ffc49abfc6a2d3a28c20ccdbebfe2fd7bb55a77843/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73697a652d253343314d2d677265656e2e737667)](https://packagist.org/packages/jiejunf/laravel-version-service)

About
-----

[](#about)

`laravel-version-service`将添加用于查询代码的版本信息的接口。

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

[](#installation)

```
composer require jiejunf/laravel-version-service
```

如果 laravel 的版本 &lt; 5.5 ，还需要将 VersionService\\VersionServiceProvider 添加到 config/app.php 的 providers 数组中。

Configuration
-------------

[](#configuration)

使用以下命令发布默认的配置文件到`config/version.php`

```
php artisan vendor:publish --provider="Jiejunf\VersionService\VersionServiceProvider"
```

参数区分客户端及服务端，根据需求配置合适的参数

`app_type`参数为同平台多版本配置，如Android平台上有雇主/雇员、商户/顾客/企业之类的不同版本,若无多版本可填写单一版本或至空(为空数组时此路由参数将被移除)

`server_enable`参数为false时，服务端接口无法请求

> 注意：配置信息会影响迁移、路由、控制器

Usage
-----

[](#usage)

- 客户端

    > 客户端接口需要迁移数据表，迁移前请根据项目配置好参数[参数信息](#configuration)

    ```
    php artisan migrate --path="vendor/jiejunf/laravel-version-service/src/migrations"
    ```

    > 以下路由的参数均来自`config/version.php`

    获取最新版本

    - GET /{app\_prefix}/{type}/{platform}/latest
    - Headers

        namerequiredtypedescApp-Versionstring外版本号,参数影响此版本到最新版本是否需要强制更新> 在config.version.app\_header中设定

    获取版本列表

    - GET /{app\_prefix}/{type}/{platform}

    更新版本信息

    - PUT /{app\_prefix}/
    - Body

        namerequiredtypedescplatformrequiredstring平台，必须是配置中的一个app\_typerequiredstring类型，必须是配置中的一个；没有配置时可无app\_versionrequiredstring外部版本号：v1.0.2is\_force\_updatestring必须是 y 或 n 中的一个，为空时默认为ydownload\_pathstring此版本的下载地址descriptionstring版本描述内容version\_idrequiredstring为空字符或历史版本中的一个
- 服务端

    > 服务端接口运行需要开启`exec(),shell_exec()`运行权限,且网络用户对项目目录具有正确的权限。[配置项目目录权限](https://vijayasankarn.wordpress.com/2017/02/04/securely-setting-file-permissions-for-laravel-framework/)

    获取当前服务器的代码版本

    - GET /{server\_prefix}

    拉取服务器远程主线代码

    > 测试用，生产环境中此功能不可靠。网络用户需要配置远程仓库ssh公钥

    - POST /{server\_prefix}/update

License
-------

[](#license)

根据MIT许可证发布, 见[LICENSE](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~7 days

Recently: every ~17 days

Total

11

Last Release

2440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3afd4daf68d74dd3aebb285383502930c6755899eed9478e2bff9cd141b7d15c?d=identicon)[jiejunf](/maintainers/jiejunf)

---

Top Contributors

[![jiejunf](https://avatars.githubusercontent.com/u/39072992?v=4)](https://github.com/jiejunf "jiejunf (13 commits)")

---

Tags

apilaravelprovider

### Embed Badge

![Health badge](/badges/jiejunf-laravel-version-service/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M111](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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