Every Laravel release has the version of the framework as constant in the Application. php file. You can access this constant via the app() helper. If you don't want to create a /test route to get the version, you can use php artisan tinker to get into the tinker REPL and run it from there.
The latest Laravel version is version 9, which was released on February 8, 2022.
There are two ways to find the version of your Laravel application . You can either find it by running a command via CLI/ Command Prompt or you can check Laravel version in source files of your Laravel installation.
run php artisan --version
from your console.
The version string is defined here:
https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Application.php
/**
* The Laravel framework version.
*
* @var string
*/
const VERSION = '5.5-dev';
1) php artisan -V
2) php artisan --version
AND its define at the composer.json file
"require": {
...........
"laravel/framework": "^6.2",
...........
},
If you want to know the specific version then you need to check composer.lock file and search For
"name": "laravel/framework",
you will find your version in next line
"version": "v5.7.9",
If you want to know the user version in your code, then you can use using app()
helper function
app()->version();
It is defined in this file ../src/Illuminate/Foundation/Application.php
Hope it will help :)
CASE - 1
Run this command in your project..
php artisan --version
You will get version of laravel installed in your system like this..
CASE - 2
Also you can check laravel
version in the composer.json
file in root
directory.
go to: /vendor/laravel/framework/src.Illuminate/Foundation
:
Open application.php file
Search for "version". The below indicates the version.
Run this command in your project folder location in cmd
php artisan --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With