php artisan --version is the fastest way to check which Laravel version your application is running. It works from any directory inside a Laravel project. No config file, no browser, no running server required. The command outputs a single line like Laravel Framework 12.x.x and exits.
:::note[TL;DR]
php artisan --version— one command, one line of output, works everywherephp artisan about— full environment snapshot including Laravel version (Laravel 9.21+)composer show laravel/framework— version from Composer’s dependency resolutionapp()->version()— access the version string in PHP code- Check
composer.jsonto see your version constraint :::
:::note
Laravel 12 is current as of 2026. Laravel 12 follows the annual release cadence established with Laravel 9. If you’re running Laravel Framework 11.x.x or earlier, you’re on a supported but older release. Laravel 11 receives security fixes until early 2026; Laravel 12 is the active development branch.
:::
How do you check your Laravel version with Artisan?
Run this from your project root:
php artisan --version
Expected output on Laravel 12:
Laravel Framework 12.x.x
That’s it. If you see an older version here and want to upgrade, check the upgrade guide before touching anything — major versions have breaking changes.
What does php artisan about show?
php artisan about (available since Laravel 9.21) gives you a full environment snapshot, not just the version. It includes the PHP version, database driver, cache driver, queue driver, and more:
php artisan about
Application Name ...................... My App
Laravel Version ........................ 12.x.x
PHP Version ............................ 8.3.x
Environment ............................ local
Debug Mode ............................. ENABLED
URL .................................... http://localhost
...
The scenario: A new developer joins your team and asks “what version are we on, and what’s configured?” Instead of forwarding three config files and a README, you run
php artisan aboutand paste the output. One command, full picture.
This is the better command when you’re diagnosing an environment mismatch or onboarding someone.
How do you check the version through Composer?
Composer tracks the exact installed version as it resolved it. This gives you the full semver string:
composer show laravel/framework
The output includes the version, description, and resolved dependencies. Look for the versions line:
name : laravel/framework
descrip. : The Laravel Framework.
versions : * v12.x.x
This is useful when php artisan isn’t available (during CI setup, before the autoloader runs, or when diagnosing a broken install).
How do you access the version in PHP code?
Use the application container’s version() method. The return value is the version string as a plain string:
echo app()->version();
// Output: 12.x.x
This is the value you’d use in conditional logic, version checks in service providers, or logging. Don’t hardcode the version string anywhere — always call app()->version().
Where is the version stored in the source code?
It’s defined as the VERSION constant on the Application class. You can find it at:
vendor/laravel/framework/src/Illuminate/Foundation/Application.php
Don’t rely on reading this file directly in your code. It’s useful to know where it lives when you’re reading the framework source or writing a package that needs to check the host app’s version.
What does the version constraint in composer.json mean?
The composer.json in your project root shows the version range you’ve allowed:
"require": {
"laravel/framework": "^12.0"
}
The ^ means “compatible with 12.0” — Composer will install the latest 12.x.x release but won’t upgrade to 13.x.x. The version in composer.json is a constraint, not the installed version. Run php artisan --version or composer show laravel/framework to see what’s actually installed.
Summary
php artisan --versionis the fastest check. Use it first.php artisan aboutgives you a full environment snapshot — better for onboarding and debugging.composer show laravel/frameworkshows the installed version from Composer’s perspective.app()->version()returns the version string in PHP. Useful for runtime checks.- The
composer.jsonversion constraint tells you what’s allowed, not what’s installed.
FAQ
What if php artisan —version returns an error?
This usually means the Composer autoloader is broken or the vendor directory is missing. Run composer install first, then retry.
Can I check the version without being in the project directory?
No. php artisan reads the project’s bootstrap/app.php. You must run it from the project root (or use an absolute path to artisan).
How often does Laravel release new versions? One major version per year, typically in Q1. Laravel 12 was released in 2025. Minor and patch releases happen throughout the year.
Does Laravel still provide long-term support (LTS) versions? Laravel ended the LTS designation after version 6.x. Every version now gets 18 months of bug fixes and 2 years of security fixes. Check the Laravel support policy for exact dates.
Is there a way to check the version without Composer or Artisan?
Yes. Open vendor/laravel/framework/src/Illuminate/Foundation/Application.php and look for const VERSION. This works even if Artisan is broken, as long as the vendor directory exists.
What to Read Next
- Create Indexes with Migration in Laravel — migration patterns updated for Laravel 12.
- Unsigned Columns in Laravel Migrations — how Laravel 12 handles foreign key column declarations.
- Drop Composite Indexes in Laravel Migrations — migration syntax with anonymous class format used in Laravel 9+.