Laravel framework is built on PHP programming language. The framework has updates and various features supported in different versions. Therefore, many times during application development, it is essential to be check the current version in Laravel. There are two methods to find the versions for Laravel applications on a system. You can find it by running a command, or check the Laravel version in the files.
Using The Command Line
Artisan command-line interface is a powerful tool, that is included with Laravel. You can open the command line terminal of your system. Then, navigate to your Laravel application directory. Here you can execute the following PHP artisan command to check the current Laravel version.
php artisan --version
It reveals the output in the format shown below.
Laravel Framework 8.1.2
Version check through Laravel File
Sometimes you may not have terminal access to the server-hosted Laravel applications. You may not much familiar with the command-line interface. In that case, you can simply view the Laravel version in the following file. WHM/cPanel users can use file managers to access files.
At times, you may not be able to access the command line interface or may not be familiar of its usage. In such cases, you can check the current versions in different Laravel applications from Laravel files. You should first navigate to Laravel root directory.
vim ./vendor/laravel/framework/src/Illuminate/Foundation/Application.php
This file contains the current version of Laravel used for the application. The code is as follows:
const VERSION = '8.1.2';