Download the PHP package j2nlab/laravel-simple-version without Composer
On this page you can find all versions of the php package j2nlab/laravel-simple-version. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download j2nlab/laravel-simple-version
More information about j2nlab/laravel-simple-version
Files in j2nlab/laravel-simple-version
Package laravel-simple-version
Short Description Manage easily your Laravel app version
License MIT
Homepage https://github.com/J2Nlab/laravel-simple-version
Informations about the package laravel-simple-version
Laravel-Simple-Version
Manage easily your Laravel app version
Description
With this package, you can:
- print a version on a page;
- print it in the console, via an artisan command;
- increments version number, via an artisan command.
Installation
Via Composer
Then publish the configuration file:
The initial config/version.php
is:
If build is false
, then this number is ignored; else it's incremented and never reset to 0.
If you want a build number, set to any value (0 or 1, for example).
If commit is false
, this number is ignored; else get the 6 firsts digits of the last local commit.
If you want a commit number, set to (0 or 1, for example).
Artisan commands
All available commands are:
php artisan version
Display version number, in different ways available with helpers and Blade directive, currently 'full' and 'compact' (the default).
If build value is false
.
If build and commit values are false
.
If patch and build value are false
.
php artisan version:commit
If the commit value on config/version.php
is not false
, get the 6 firsts digits of the last git local commit.
Of, if commit value is false
.
php artisan version:build
If the build value on config/version.php
is not false
, increment build number.
This number is never reseted to 0.
Of, if build value is false
.
php artisan version:patch
If the patch value on config/version.php
is not false
, increment app patch number.
Of, if patch value is false
.
php artisan version:minor
Increment app minor number version, and reset to 0 patch number.
php artisan version:major
Increment app major number version, and reset to 0 minor and patch numbers.
Summary...
It's really simple:
'major' => 0,
is incremented byversion:major
'minor' => 0,
is incremented byversion:minor
, reset to 0 byversion:major
'patch' => 0,
is incremented byversion:patch
, reset to 0 byversion:major
/minor
'build' => 0,
is incremented byversion:build
'build' => false,
is never incremented'commit' => 0,
is set with 6 firsts digits of last git commit byversion:commit
'commit' => false,
is never get
Helper
You can use this helper to get a compact version format:
Or you can choose the format:
Blade directive
You can use this directive to render a compact version format:
Or you can choose the format:
Testing
You can run some PHPunit tests with the following command:
License
This package is licensed under the MIT License - see the LICENSE file for details.
All versions of laravel-simple-version with dependencies
illuminate/console Version ^6.0|^7.0|^8.0
illuminate/view Version ^6.0|^7.0|^8.0