PHP

Quick Guide: How to Check Your Laravel Version Easily

Updated

how to check laravel version

Run php artisan --version in the project root. That prints the framework version your application is actually booting:

$ php artisan --version
Laravel Framework 13.25.0

Three other methods give the same answer from different sources, and they fail in different situations, which is the part that matters:

$ composer show laravel/framework | grep -E '^(versions|released)'
versions : * v13.25.0
released : 2026-08-11, today

$ php artisan tinker --execute='echo Illuminate\Foundation\Application::VERSION;'
13.25.0

$ php artisan about | head -4
 Environment ..
 Application Name .. Laravel
 Laravel Version .. 13.25.0
 PHP Version .. 8.5.8

What composer.json and composer.lock tell you

Taking the version listed on the laravel/framework line of composer.json as the Laravel version your project is using is wrong, and it is the single most common way people misreport their version. composer.json holds a constraint, not a version. Here is the actual line from the project that printed 13.25.0 above:

$ grep 'laravel/framework' composer.json
        "laravel/framework": "^13.8",

^13.8 means “anything from 13.8.0 up to but not including 14.0.0”. Every 13.x release satisfies it. The file that records what you have is composer.lock:

$ php -r '$l=json_decode(file_get_contents("composer.lock"),true);
  foreach($l["packages"] as $p) if($p["name"]==="laravel/framework")
    echo $p["version"], " ", substr($p["source"]["reference"],0,12), "\n";'
v13.25.0 ed36fe882bd4

Why the difference is not academic

To show the gap is real, I built a second project whose composer.json pins 13.8.* — a version the ^13.8 constraint above also permits — and installed it:

$ grep framework composer.json
        "laravel/framework": "13.8.*"

$ composer show laravel/framework | grep '^versions'
versions : * v13.8.0

$ composer audit
Found 3 security vulnerability advisories affecting 1 package:
| Package           | laravel/framework                                        |
| Severity          | high                                                     |
| Title             | Laravel Framework: CRLF injection in default email rule  |
| Affected versions | <12.60.0|>=13.0.0,<=13.9.0                                |
...

Composer 2.10 refused the install outright until I set policy.advisories.block false, which is worth knowing on its own. Two projects, the same ^13.8-compatible constraint, one of them carrying a high-severity advisory. Reading the constraint would have told you neither.

Which method to use when

php artisan --version needs a bootable application. Delete or forget to install vendor/ and it does not report an old version — it dies before it can report anything:

$ php artisan --version
PHP Fatal error:  Uncaught Error: Failed opening required '.../vendor/autoload.php' in .../artisan:10

composer show laravel/framework reads vendor/composer/installed.json, so it fails the same way (No dependencies installed. Try running composer install or update.). If all you have is a checkout with no vendor/ — a CI job before composer install, a colleague’s zip, a Git repo — use the lock file directly:

$ composer show --locked laravel/framework | grep '^versions'
versions : * v13.25.0

So: artisan for what is running, composer show for what is installed, composer show –locked for what will be installed, and composer.json for what is merely allowed. Those are four different questions and they can have four different answers.

Because how-to-check-laravel-version.sh installs a fresh app with composer create-project, your own project stays untouched while it re-checks that the four version readouts at the top of the page agree, that composer.json holds a range rather than the version, and that composer show --locked works without vendor/ when artisan and composer show do not.

One caveat on 13.25.0

The exact number you get from composer create-project depends on the day you run it — 13.25.0 was released the morning this page was written. It also depends on your PHP version: the same command on PHP 8.3.31 resolves Laravel 13.25.0 but Symfony 7.4.16, where PHP 8.5.8 resolves Symfony 8.1.x. That is covered in installing Laravel with Composer, along with why a lock file built on one PHP version may not install on another.

If composer show itself fails, check Composer before checking Laravel — see installing Composer with Homebrew on macOS.

Photo of author
Sudhir P. founded HeatWare.com in 1999 and has built and operated it full-stack ever since; it is now used by more than 88,000 people. He writes here about the PostgreSQL, MySQL, Linux and DevOps work that keeps it running. Articles are rewritten only after the commands in them have actually been run, and the verification scripts are published alongside them so anyone can check the claims. Reach him at blog@heatware.net.