Being a Laravel developer, we must know this PHP framework offers two easy methods to check the version of our Laravel application.
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
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';
...............................
...............................
...............................
...............................
...............................
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.
If you want to learn how to get the current route's name, component pathname or…
React show and hide example. In this tutorial, we will show you how to step…
Tabs are one of the best UI elements for displaying multiple contents in a single…
In this tutorial, we will learn how to create a toast notification component in the…
Bootstrap offers tons of custom UI solutions. On top of that, it is easy to…
React js counter using the useReducer hook example. In this post, we will learn how…