How to check Laravel version?

参考: http://www.elcoderino.com/check-laravel-version/

1. The easiest way is to simply run artisan command php artisan --version from your CLI and it will return your Laravel version:

2. You can also browse to and open file vendor\laravel\framework\src\Illuminate\Foundation\Application.php. You will see the version of your Laravel instalation near the top of the class, defined as a constant:
/**
* The Laravel framework version.
*
* @var string
*/
const VERSION = '4.0.10';

3. You can also place a little code in your routes.php file at the end and then access it like yourdomain.com/laravel-version . This of course assumes that there is nothing in your routes.php file that would not allow the access of /laravel-version route.
Route::get('laravel-version', function()
{
$laravel = app();
return "Your Laravel version is ".$laravel::VERSION;
});

posted @ 2016-05-01 12:40  qike  阅读(461)  评论(0编辑  收藏  举报