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 pass link from controller to view in laravel on ajax call
- Database transactions in laravel
- Laravel migration add foreign key to existing table
- How to run a specific seeder class in laravel
- How to prevent host header attack in Laravel
- How to insert dynamic value to additional column in pivot table in laravel
- Convert input array to comma-separated string in laravel controller
- Get Array of IDs from Eloquent Collection
- How to add dynamic page title in Laravel view
- How to get selected categories on edit record with Select2
- Return redirect laravel not working
- How to update record after save method in Laravel
- Route group with URI prefix using middleware and route name prefixes
- Wheredate in laravel not working
- How to pass external link in laravel blade to anchor tag
- Laravel route redirect not working
- Display option of select as selected with blade directive Laravel
- How to get data from two tables in laravel
- Call to a member function update() on null
- JQuery each loop on json response after ajax in laravel
- Route [password.request] not defined
- Display first n record from collection in laravel view
- How to get last year records count with month wise in Laravel
- Update record after find method in lavavel
- Php artisan make model, factory, migration and controller in single command