承接 mnabialek/laravel-version 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mnabialek/laravel-version

最新稳定版本:v1.0.9

Composer 安装命令:

composer require mnabialek/laravel-version

包简介

Get Laravel/Lumen version

README 文档

README

Packagist Tests codecov

This package let you verify whether current application is Laravel or Lumen, get application version and verify whether application is minimum at given version string.

Installation

  1. Run

    composer require mnabialek/laravel-version

    in console to install this module

  2. That's it! Installation is complete. You don't need to adjust any config or install service providers.

Usage

Just run:

$version = app()->make(\Mnabialek\LaravelVersion\Version);

(you can obviously use dependency injection) and then use one of available methods for example like this

$result = $version->isLaravel();

or

if ($version->isLaravel()) {
   // do something
}

Available methods

  • isLaravel() - verify whether application is Laravel (true for Laravel, false for Lumen)
  • isLumen() - verify whether application is Lumen (true for Lumen, false for Laravel)
  • full() - get full version string (keep in mind for Lumen it can be for example: 'Lumen (5.5.2) (Laravel Components 5.5.*)')
  • get() - get version (for Both Laravel and Lumen it will contain only version number for example 5.5.2)
  • min($checkedVersion) - verify whether application is minimum at given version. As $checkedVersion you should pass version you want to verify for example 5.5 or 5.5.21

Licence

This package is licenced under the MIT license

统计信息

  • 总下载量: 649.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 6
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04