Laravel Tutorials

How to Check Laravel Version via CLI and Application File

In this tutorial, we will look at how to check the laravel version using a command-line interface, and we also have a look at the project files to identify the find out the laravel version.

How To Check The Laravel Version?

Being a Laravel developer, we must know this PHP framework offers two easy methods to check the version of our Laravel application.

  • Check Laravel version using the command.
  • Check Laravel version using the Laravel project files.

Check Laravel Version using the Command

The easiest way is to check the Laravel version is using the command that we have mentioned the command below.

You need to execute this command through your terminal window. Get inside your Laravel project and execute the command to check Laravel.

php artisan --version

#or 

php artisan -v

You will get the following output on your terminal window.

Laravel Framework 7.13.0

Check Laravel Version in Application File

This method is a little bit different than the method we used in the previous step. We have to navigate to the Application file to check the Laravel version through the file. Following is the full root that will take you to the Application.php file.

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

You can see the version number of Laravel at around line no 36, and the version is defined in the const VERSION = ‘….’.

<?php

namespace Illuminate\Foundation;

...............................
...............................
...............................
...............................
...............................

class Application extends Container implements ApplicationContract, CachesConfiguration, CachesRoutes, HttpKernelInterface
{
    /**
     * The Laravel framework version.
     *
     * @var string
     */    const VERSION = '7.13.0';

...............................
...............................
...............................
...............................
...............................

Conclusion

This was it, easy is in it
Finally, we have completed this quick tutorial about finding out the Laravel version using the command line tool and also through the Application.php file. It’s upto you which process is the easiest for you.

Digamber

I am Digamber, a full-stack developer and fitness aficionado. I created this site to bestow my coding experience with newbie programmers. I love to write on JavaScript, ECMAScript, React, Angular, Vue, Laravel.

Recent Posts

React Router DOM 6 Fetch Current URL / Pathname Tutorial

If you want to learn how to get the current route's name, component pathname or…

2 days ago

React Js Hide & Show with React Bootstrap Collapse Tutorial

React show and hide example. In this tutorial, we will show you how to step…

5 days ago

How to Integrate Tabs in React Js with React Bootstrap

Tabs are one of the best UI elements for displaying multiple contents in a single…

1 week ago

How to Build Toast Component in React Js with Bootstrap

In this tutorial, we will learn how to create a toast notification component in the…

2 weeks ago

React Js Bootstrap Modal Popup Component Tutorial

Bootstrap offers tons of custom UI solutions. On top of that, it is easy to…

2 weeks ago

React Build Counter using useReducer Hook Tutorial

React js counter using the useReducer hook example. In this post, we will learn how…

2 weeks ago