1

I have updated my PHP version to 7.2 and changed the Laravel version in the composer.json file to 5.7.*

I then ran composer update in the console and want to make sure that Laravel updated (I didn't see the outcome of the command since I sent the request to my hosting team)

Is there a way to know for sure which version is running?

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
Robin
  • 65
  • 1
  • 12

2 Answers2

5

1) Using terminal.

php artisan --version or php artisan -V

2) Using in Files go to /vendor/laravel/framework/src/Illuminate/Foundation/Application.php

enter image description here

3) Using the blade template.

{{ App::VERSION() }}

4) Using composer.json

"require": {
        "php": ">=7.1.3",
        "laravel/framework": "5.6.*",
    }

5) Using route.php file

Route::get('laravel-version', function()
{
    $laravel = app();
    echo "Your Laravel version is ".$laravel::VERSION;
});

Check with url yourdomain.com/laravel-version

Dilip Hirapara
  • 14,810
  • 3
  • 27
  • 49
0

You can View current Laravel version through Blade Templates

First way:

{{ App::VERSION() }} 

Second way:

<?php
     echo $app::VERSION;
?>

Also, the Laravel version installed can be checked in the command line:

php artisan --version

This will show you which Laravel version is currently running.

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64