How to see the version of Laravel
Learn how to check Laravel version with an example: discover the easiest way to find out what version of Laravel you are running.
Checking Laravel Version
If you are using the Laravel framework, it's good practice to keep your version up to date. You can check your version of Laravel using the Artisan CLI.
$ php artisan --version
Laravel Framework 6.18.28
The version number will be displayed after the words 'Laravel Framework'.
You can also check the Laravel version by looking at the /vendor/laravel/framework/src/Illuminate/Foundation/Application.php
file in the root of your project. The version number is displayed at the top of the file. For example:
<?php
namespace IlluminateFoundation;
use IlluminateSupportStr;
use IlluminateSupportArr;
use IlluminateSupportCollection;
use IlluminateFilesystemFilesystem;
use IlluminateSupportFacadesFacade;
class Application extends Container
{
/**
* The Laravel framework version.
*
* @var string
*/
const VERSION = '6.18.28';
}
The version number is displayed after the constant VERSION
.
It is important to keep your version of Laravel up to date in order to take advantage of the latest features and bug fixes. You can update your version of Laravel using the composer update
command.
$ composer update
This will update all of your project's dependencies, including Laravel.