Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
/ laravel-version Public archive

This simple package reads a version.json (or whatever is configured) from your base_path() and gives you a version object, which you can utilize in your view.

License

Notifications You must be signed in to change notification settings

Hank-IT/laravel-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-Version

This simple package reads a version.json (or whatever is configured) from your base_path() and gives you a version object, which you can utilize in your view.

 <p class="text-center">Laravel  @unless($version->isEmpty()) (Version: {{ $version->branch }}-{{ $version->build }}-{{ $version->hash }}) @endif</p>

No errors are thrown if the key doesn't exist or the json file is missing or invalid.

Installation

composer require mrcrankhank/laravel-update

If you run Laravel <= 5.4, add the service provider to the 'providers' array in config/app.php:

MrCrankHank\LaravelVersion\VersionServiceProvider

Publish config file (only necessary if you don't want to use the default filename 'version.json')

php artisan vendor:publish

Compatibility

This package was developed in Laravel 5.5, but should work in other versions as well.

License

The MIT License (MIT). Please see License File for more information.

About

This simple package reads a version.json (or whatever is configured) from your base_path() and gives you a version object, which you can utilize in your view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages