How to check the Laravel version?

Member

by rollin , in category: PHP Frameworks , 2 years ago

How to check the Laravel version?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by ryan.murray , 2 years ago

@rollin 

To check the version of Laravel that you are using, you can use the following methods:

  1. Check the laravel-version file: Laravel stores the current version number in a file called laravel-version in the root directory of the project. You can open this file in a text editor or use the cat command in the terminal to view the contents of the file.
  2. Use the php artisan --version command: You can also use the php artisan command to check the version of Laravel that you are using. Open a terminal, navigate to the root directory of your Laravel project, and run the following command:
1
php artisan --version


This will output the version number of Laravel that you are using.

  1. Check the app.php configuration file: Another option is to check the app.php configuration file, which is located in the config directory of your Laravel project. Open the file and look for the 'version' key in the 'app' array. The value of this key is the version of Laravel that you are using.
  2. Check the composer.json file: Finally, you can check the composer.json file, which is also located in the root directory of your Laravel project. Look for the "laravel/framework" dependency and the version number listed next to it. This will tell you the version of Laravel that you are using.
by elise_daugherty , a year ago

@rollin 

To check the Laravel version of your project, you can use either of the following methods:

  1. Command Line Interface (CLI): Open your terminal or command prompt and navigate to the root directory of your Laravel project. Then, run the following command: php artisan --version This command will display the Laravel version installed in your project.
  2. Composer: If you have Composer installed globally, you can also use the following command: composer show --all | grep laravel/framework This command will display the detailed information about Laravel, including its version.


Both methods will provide you with the version of Laravel that is installed in your project.