How to know Laravel version and where is it defined?

后端 未结 10 1101
陌清茗
陌清茗 2021-01-30 01:50

How to know Laravel version and where is it defined?

Is Laravel version is defined inside my application directory or somewhere in global server side directory?

相关标签:
10条回答
  • 2021-01-30 02:25

    If you want to know the user version in your code, then you can use using app() helper function

    app()->version();
    

    It is defined in this file ../src/Illuminate/Foundation/Application.php

    Hope it will help :)

    0 讨论(0)
  • 2021-01-30 02:26

    Step 1:

    go to: /vendor/laravel/framework/src.Illuminate/Foundation:

    Step 2:

    Open application.php file

    Step 3:

    Search for "version". The below indicates the version.

    0 讨论(0)
  • 2021-01-30 02:28

    Yet another way is to read the composer.json file, but it can end with wildcard character *

    0 讨论(0)
  • 2021-01-30 02:28

    In your Laravel deployment it would be

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

    to see who changed your Laravel version look at what's defined in composer.json. If you have "laravel/framework": "5.4.*", then it will update to the latest after composer update is run. Composer.lock is the file that results from running a composer update, so really see who last one to modify the composer.json file was (hopefully you have that in version control). You can read more about it here https://getcomposer.org/doc/01-basic-usage.md

    0 讨论(0)
  • 2021-01-30 02:35
      1)  php artisan -V
    
      2)  php artisan --version
    

    AND its define at the composer.json file

    "require": {
            ...........
            "laravel/framework": "^6.2",
            ...........
        },
    
    0 讨论(0)
  • 2021-01-30 02:40

    CASE - 1

    Run this command in your project..

    php artisan --version  
    

    You will get version of laravel installed in your system like this..

    CASE - 2

    Also you can check laravel version in the composer.json file in root directory.

    0 讨论(0)
提交回复
热议问题