码迷,mamicode.com
首页 > 其他好文 > 详细

How to check Laravel version?

时间:2016-05-01 13:27:07      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

参考: 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;
});

How to check Laravel version?

标签:

原文地址:http://www.cnblogs.com/qike/p/5450329.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!