
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
- Wheredate in laravel not working
- How to display 1 day ago in comments in laravel view
- Get ids in array from users table
- Input file with max size validation in laravel
- How to upload files to amazon s3 bucket using Laravel
- How to set column as primary key in Laravel model
- SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
- Get content from web URL in laravel
- If no route matched route::fallback in laravel
- Get 30 days older records from table in laravel
- Convert multidimensional array to single array in Laravel
- InRandomOrder() method with example in laravel
- Route prefix with auth middleware in laravel
- How to get column names from table in Laravel
- Seed database using SQL file in Laravel
- How to get only time from created_at in laravel
- How to create belongstomany relation using custom name on custom pivot table
- How to update record after save method in Laravel
- How to get records in random order in laravel
- Pagination in laravel
- How to get single column value in laravel
- Get the post details if it has at least one comment in comments table
- How to fill a column automatically while creating records in Laravel
- If condition in Laravel 9
- How to Get records between two dates in Laravel