How to check Laravel version using PHP Artisan CLI OR in source file

By | August 8, 2020

In the Laravel framework, there are two ways available to check the Laravel version of any project installed on your server or your local computer. The first one is using the command line (CLI) and the second method is to navigate to the source file where the version is defined. Before running the command, please make sure that the composer is installed on your computer.

In my previous post, I have written about How to clear cache in Laravel. Which may interest you.

How to check the version using the command line

Using the command line to check the version name of the Laravel is pretty easy than checking into source files. Open the command line on your system and navigate to your project root directory and execute the below command.

php artisan --version

and the output would be like below screenshot:

How to check the version in the source code

If you want to check the version in your project’s source code, then you will need to navigate through  ‘vendor/laravel/framework/src/Illuminate/Foundation/’ directory from your project root directory and then search for Application.php file and open this file in any editor of your choice and search for ‘VERSION’. See screenshot below:

I hope, this will help you.

Leave a Reply

Your email address will not be published. Required fields are marked *