Get laravel version

You can get laravel version of current working project using command on terminal and you can also use code snippet to get the version with app() helper method

Answers 2
  • Get laravel version using code snippet

    //Get laravel version in controller file
    //Inside controller method
    //Get laravel version in view file
    {{ app()->version() }}
    Route::get('/get-version', function(){
        echo app()->version();

    Output : 8.26.1

    You can get the version of laravel using app()->version() method. This is helper method you can call in controller as well as view file. 

  • Get laravel version using command in terminal

    php artisan -v

    Go to your project directory and run command php artisan -v to get the laravel version of current working project.

  • Back to code snippet queries related laravel