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
- How to create laravel project using composer
- Argument 1 passed to App\Http\Controllers\Auth\LoginController::authenticated() must be an instance of App\Http\Controllers\Auth\Request
- How to get IP address in laravel
- How to insert value to additional columns in pivot table in laravel
- How to delete record in Laravel with ajax
- How to get path from current URL in Laravel
- Get duplicate records in laravel
- How to start websocket server in laravel
- How to use bootstrap pagination in laravel 8
- Get today records in Laravel
- Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to tcp://smtp.gmail.com:587 (Connection refused)"
- Include External CSS and JS file in Laravel
- How to create static page in Laravel
- If condition in Laravel 9
- Update record after find method in lavavel
- Use of undefined constant laravel
- How to display HTML tags In Laravel blade
- Laravel 11 project setup on localhost using breeze with blade step by step
- How to show data by ID in laravel?
- Create record with unique slug in laravel
- How to display a specific word from a string in laravel
- Get last year created records in Laravel
- Delete all related comments on deleting a post in Laravel
- How to upload image in laravel 8
- Route prefix with auth middleware in laravel