2017 © Pedro PelĂĄez
 

library laravel-version

Get Laravel/Lumen version

image

mnabialek/laravel-version

Get Laravel/Lumen version

  • Friday, May 11, 2018
  • by mnabialek
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4,080 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 204 % Grown

The README.md

Laravel Version

Build Status Coverage Status Scrutinizer Code Quality Packagist, (*1)

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., (*2)

Installation

  1. Run, (*3)

    composer require mnabialek/laravel-version
    

    in console to install this module, (*4)

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

Usage

Just run:, (*6)

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

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

$result = $version->isLaravel();

or, (*8)

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, (*9)

The Versions

11/05 2018

dev-master

9999999-dev

Get Laravel/Lumen version

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcin NabiaƂek

laravel lumen laravel version lumen version

11/05 2018

v1.0.1

1.0.1.0

Get Laravel/Lumen version

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcin NabiaƂek

laravel lumen laravel version lumen version

07/01 2018

v1.0

1.0.0.0

Get Laravel/Lumen version

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcin NabiaƂek

laravel lumen laravel version lumen version