If you want to check the Laravel version for a Laravel project, you can do this through the command line. Here are a couple of ways to find out the Laravel version:
- Using Artisan Command: Open a terminal and navigate to your Laravel project’s root directory. Then, run the following command:bash
php artisan --version
This command will display the Laravel version installed in your project.
- Checking composer.json: Laravel version information is also stored in the composer.json file of your project. Open the composer.json file and look for the laravel/framework package:json
"require": {
"php": "^7.3|^8.0",
"laravel/framework": "^8.0",
// other dependencies...
},
The value next to
"laravel/framework"
indicates the installed Laravel version. In this example, it’s “^8.0,” which means Laravel version 8.
Choose either method based on your preference, and you’ll be able to determine the Laravel version for your project.