
Get laravel version
Get laravel version
Hello everyone, in this post we will look at how to solve "Get laravel version" in programming.
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-
Get laravel version using code snippet
//Get laravel version in controller file app\Http\Controllers\HomeController.php //Inside controller method app()->version() //Get laravel version in view file //resources\views\home.blade.php {{ app()->version() }} //routes\web.php 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.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- Class 'App\Http\Controllers\User' not found
- How to customize or Change validation error messages
- Laravel append URI in route
- Order by multiple columns in Laravel
- How to create new user without form submission in laravel
- How to Access Array in blade laravel
- How to run a specific seeder class in laravel
- Get content from web URL in laravel
- Drop foreign key column in Laravel using migration
- Call to a member function getRelationExistenceQuery() on array in Laravel
- Conditional where clause in Laravel
- The use statement with non-compound name 'DB' has no effect
- Display data in table using foreach in Laravel
- Get last year created records in Laravel
- How to pass data to route in laravel?
- Seed database using SQL file in Laravel
- Class "App\Http\Controllers\Auth\Verified" not found
- How to get all route list
- Target class [admin] does not exist.
- Laravel route redirect not working
- How to show data by ID in laravel?
- Eager loading dynamically in laravel
- Get id of last inserted record in laravel
- Route group with URI prefix using middleware and route name prefixes
- How to get route method name in Laravel