How to Check Laravel Version (Full Guide for Beginners)

How to Check Laravel Version (Full Guide for Beginners)

Image credit: laravel-news

Hello Laravel developer!  Are you are working on a Laravel project? If yes, then it is very important to know which Laravel version your application is running on. The Laravel version helps you to understand compatibility, available features, security updates, and package requirements. Whether you are debugging, upgrading, or installing a new package, checking the Laravel version is the first step.

In this blog, we will explain all possible ways to check the Laravel version, using commands, files, and within your code. So, let’s start

Why to Know Laravel Version Is Important?

Checking the Laravel version helps you in these things: Did you check?

  • Identify compatibility with PHP version

  • Know which features your project supports

  • Install correct packages and dependencies

  • Find proper documentation

  • Plan framework upgrades easily

1. Check Laravel Version Using Artisan Command

The easiest and most common method is using the Artisan CLI.

Command:

 

php artisan –version

Output Example:

 

Laravel Framework 10.9.0

This command works on all Laravel versions and gives an instant result.

 

2. Check Laravel Version Using composer.json File

 

Every Laravel version is mentioned in the composer.json file inside your project.

Steps:

  1. Open your project folder

  2. Go to the root directory

  3. Open the composer.json file

  4. Look for this line:

“laravel/framework”: “^10.0”

This tells you the major version your project is using.

 

3. Check Version Using Laravel Application Helper

If you want to check the version from your code, you can use this method.

Code:

 

echo app()->version();

You can put this line inside a route or controller to display the version in the browser.

 

4. Check Laravel Version Using the About Command (Laravel 9+)

Laravel introduced a new, detailed command:

php artisan about

And this shows:

  • Laravel version

  • PHP version

  • Environment

  • Cache & configuration info

  • Application path

 

5. Check Laravel Version Inside the vendor Folder

Not recommended, but still possible.

Path:

vendor/laravel/framework/src/Illuminate/Foundation/Application.php

Open the file and look for a version constant:

const VERSION = ‘10.12.0’;

6. Check Laravel Version Using Browser (Via Debugbar)

If you have installed Laravel Debugbar, you can also see the version at the bottom bar of your browser.

(Useful mainly for developers using local setups.)

Method Best For Difficulty
php artisan --version Quick version check ★☆☆☆☆
composer.json Major version check ★☆☆☆☆
app()->version() Display version in code ★★☆☆☆
php artisan about Detailed information ★☆☆☆☆
Debugbar UI based info ★★☆☆☆

Depending on your setup, there are several ways to check the Laravel version, and it’s really easy. The Artisan command is the very fast way, but you may still check the version using your application code or the composer.json file if you don’t have terminal access. To maintain improved security, speed, and performance, make sure your Laravel version is always up-to-date.

Author

  • Urvarshi Sharma is a writer specializing in IT services, focusing on creating insightful content about technology, innovation, and industry trends. With a keen understanding of the IT landscape, she writes engaging articles that simplify complex topics, helping businesses stay informed and make strategic decisions in the ever-evolving tech world.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top