How to check the Laravel version?

Member

by rollin , in category: PHP Frameworks , 9 months ago

How to check the Laravel version?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by ryan.murray , 3 months 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.