From e114166eea2c19b7dc4175a09ec7cece570e8305 Mon Sep 17 00:00:00 2001 From: Williamug Date: Wed, 10 Apr 2024 21:46:21 +0000 Subject: [PATCH 1/3] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b3198..2055172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to `versioning` will be documented in this file. +## v1.0.4 - 2024-04-10 + +### What's Changed + +* wip by @Williamug in https://github.com/Williamug/versioning/pull/9 + +**Full Changelog**: https://github.com/Williamug/versioning/compare/v1.0.3...v1.0.4 + ## v1.0.3 - 2024-04-10 ### What's Changed From e49459a04a217ca8690d72be24b63bf5be04dac3 Mon Sep 17 00:00:00 2001 From: Asaba William Date: Tue, 16 Apr 2024 13:28:21 +0300 Subject: [PATCH 2/3] Add documentation --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4552b0b..c475396 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,14 @@ If you are using Laravel you can use the following code to display the version o Williamug\Versioning\Versioning::tag() // v1.0.0 ``` -You can add the above piece of code in either your controller or blade views. + +#### For Laravel Blade +If you are using Laravel Blade you can use the following code to display the version of your application: +```blade +
+ @app_version() +
+``` ## Testing From 968fbdb0295b84633cc2c9a18918f64afb5bafc6 Mon Sep 17 00:00:00 2001 From: Asaba William Date: Tue, 16 Apr 2024 13:28:33 +0300 Subject: [PATCH 3/3] Add blade directive --- src/VersioningServiceProvider.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/VersioningServiceProvider.php b/src/VersioningServiceProvider.php index 16774ad..6ec80cc 100644 --- a/src/VersioningServiceProvider.php +++ b/src/VersioningServiceProvider.php @@ -11,4 +11,14 @@ public function configurePackage(Package $package): void { $package->name('versioning'); } + + /** + * Bootstrap services. + * + * @return void + */ + public function boot() + { + Blade::directive('app_version', fn ($money) => ""); + } }