Have you recently created any app in Laravel? Are you looking for ways to check your application's Laravel version? If yes, we have created this guide to help you with this information in a jiffy! So, without any further ado, let's get started!
Finding Laravel Version
Want to look for the right Laravel application version? Well, there is a plethora of ways to check its version and pick the one that caters to your needs well. Check out these three methods in detail below!
1. Via CLI (Command Line Interface)
Your Command Line interface can be used to quickly run a particular command that will display the Laravel version being used. The specific command is named the artisan command. In case you use this terminal often, you must be aware that it is recognized as an easy way to use this command.
Just type the below-given command and press enter to reveal the version in no time.
PHP artisan --version
2. Use the app() helperEvery developer in a Laravel Framework development company knows about the app() helper and how it can be used to know the version from its Application.php file. All you need to do is: type the given command to access it immediately.
app()->version()
In case you do not wish to develop /test route, then you can make use of PHP artisan tinker for the same. Once you keep using Tinkerwell, just directly run this code in Tinkerwell. In this way, you can check the Laravel version without any hassle.
3. Blade template for command-less Laravel version displayAnother super easy method to check its Laravel version involves the use of Blade in the admin system. Using this, you can easily check it without running any commands or code. Just simply type: {{ app()->version() }} and you can know about the latest version immediately.
You can even make use of the Blade directive in case of multiple views. These are put in the application under the AppServiceProvider's boot method. Therefore, all you need to do is copy-paste the given code for viewing Laravel's version using @laravelVersion
Blade::directive('laravelVersion', function () {
return "<?php echo app()->version(); ?>";
});
Some Last Words
This guide will help you know about the app's Laravel version with just one step of running commands. So, quickly go through this guide and get the latest version in no time.
Finding Laravel Version
Want to look for the right Laravel application version? Well, there is a plethora of ways to check its version and pick the one that caters to your needs well. Check out these three methods in detail below!
1. Via CLI (Command Line Interface)
Your Command Line interface can be used to quickly run a particular command that will display the Laravel version being used. The specific command is named the artisan command. In case you use this terminal often, you must be aware that it is recognized as an easy way to use this command.
Just type the below-given command and press enter to reveal the version in no time.
PHP artisan --version
2. Use the app() helperEvery developer in a Laravel Framework development company knows about the app() helper and how it can be used to know the version from its Application.php file. All you need to do is: type the given command to access it immediately.
app()->version()
In case you do not wish to develop /test route, then you can make use of PHP artisan tinker for the same. Once you keep using Tinkerwell, just directly run this code in Tinkerwell. In this way, you can check the Laravel version without any hassle.
3. Blade template for command-less Laravel version displayAnother super easy method to check its Laravel version involves the use of Blade in the admin system. Using this, you can easily check it without running any commands or code. Just simply type: {{ app()->version() }} and you can know about the latest version immediately.
You can even make use of the Blade directive in case of multiple views. These are put in the application under the AppServiceProvider's boot method. Therefore, all you need to do is copy-paste the given code for viewing Laravel's version using @laravelVersion
Blade::directive('laravelVersion', function () {
return "<?php echo app()->version(); ?>";
});
Some Last Words
This guide will help you know about the app's Laravel version with just one step of running commands. So, quickly go through this guide and get the latest version in no time.