Home > Net >  How can I get and print/log the currently installed exact version number of Lumen?
How can I get and print/log the currently installed exact version number of Lumen?

Time:03-23

As I mentioned in the Q-title, I want to print/log the currently installed version of Lumen framework i.e. the exact version number of Lumen thro' Bash script in GitBash terminal or PHP snippet in any Model / Controller.

I recently upgraded Lumen by providing "laravel/lumen-framework": "^8.0", in composer.json and running composer update then.

And I know we can get the correct version number in Laravel by either php artisan --version or App::VERSION(); in terminal or code respectively.

How can I do the same with Lumen, as I ain't so familiar with Lumen ?

CodePudding user response:

The Application class of Lumen has a public method called version().

You can see it in the repo here

So I'd say it's quite the same as you would do in Laravel.

  • Related