Check Current Laravel Version of Your Project
In this article, we are going to learn how to check the current Laravel version of any Laravel project. Let's get started.
We can check the current Laravel version using some artisan commands. First command:
php artisan --version
Laravel Framework 10.24.0
We can also add --version
command with any artisan command:
php artisan make:model --version
Laravel Framework 10.24.0
We can also use this command:
php artisan about
Application Name ..................................... Shouts
Laravel Version ...................................... 10.24.0
PHP Version .......................................... 8.1.10
Composer Version ..................................... 2.4.2
From the composer.json file, we can see the minimum version of Laravel.
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8"
},
Using the app()
helper, we are able to check current Laravel version:
app()->version(); // 10.24.0
Navigate to the Laravel web root directory. Open the file and search for the string VERSION:
class Application extends Container implements ApplicationContract, CachesConfiguration, CachesRoutes, HttpKernelInterface
{
/**
* The Laravel framework version.
*
* @var string
*/
const VERSION = '10.24.0';
}
Md Obydullah
Software Engineer | Ethical Hacker & Cybersecurity...
Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.