I am going to start working on existing Laravel project and I checked Laravel version using 2 ways:
- I run
php artisan --version
andLaravel Installer 4.2.10
got printed. - I checked
composer.json
file and there islaravel/framework": "^8.0
.
Which one is real one? Thank you in advance.
PS: This question is not about how to. It is about why 2 different method return 2 different answer.
CodePudding user response:
Search in composer.lock "name": "laravel/framework",
for see current installed version
CodePudding user response:
using
php artisan --version
to check via CLI.app()->version() to print version in blade template.
CodePudding user response:
To answer your question, the Laravel Installer
is the composer laravel installer which allows devs to run
laravel new blog
instead of
composer create-project laravel/laravel:^8.0 blog
Laravel Framework
is the one that will advise what version of laravel you are running