tuijncode / laravel-version

1.0 2024-09-29 12:15 UTC

This package is auto-updated.

Last update: 2024-09-29 12:44:47 UTC


README

Total Downloads Latest Stable Version License

Html

使用 Laravel Version,您可以在项目中检索各种版本,这对于您拥有多个项目且需要确定哪些项目需要更新尤其有用。

"Buy Me A Coffee"

安装

通过 Composer 安装此包

composer require tuijncode/laravel-version

发布包的配置文件

php artisan vendor:publish

选择以下选项

Provider: Tuijncode\LaravelVersion\ServiceProvider

将您的令牌添加到 .env 文件中

TUIJNCODE_LARAVEL_VERSION_TOKEN="your-token"

用法

https://example.com/tuijncode/laravel-version?token=your-token

响应 (JSON)

{
    "status": "OK",
    "versions":
        {
            "webserver":
                {
                    "name": "Apache",
                    "version": "Apache\/2.4.58 (Unix) mod_wsgi\/4.9.4 Python\/3.11 mod_fastcgi\/mod_fastcgi-SNAP-0910052141 OpenSSL\/1.1.1u"
                },
            "laravel":
                {
                    "name": "Laravel",
                    "version": "11.23.5"
                },
            "database":
                {
                    "name": "mysql",
                    "version": "8.0.35"
                },
            "php":
                {
                  "name": "cgi-fcgi",
                  "version": "8.2.20"
                }
        }
}