I don\'t want to check my Laravel version in the command prompt (php artisan --version
), but in the view itself.
Like this:
Only for a specific Project Folder to know the Laravel version of that project on CLI
$ php artisan --version
remove $
while copying only for representation purpose
In Laravel's Blade templates:
{{ App::VERSION() }}
Note that this is tested in 5.3x
This is the way how to see laravel version in command explorer:
php artisan --version
View current Laravel version through Blade Templates, there are many ways:
1st way to show,
{{ App::VERSION() }}
2nd way,
<?php echo $app::VERSION ; ?>
3rd way,
<?php
$laravel = app();
echo $laravel::VERSION;
?>
The Laravel version installed can be checked in the command line using the following command :
php artisan --version
you can use this code in routing file of your laravell installation
$app->get('/', function () use ($app) {
return $app->version();
});
On view you will get installed version of laravell.
$laravel = app();
$version = $laravel::VERSION;