I’m trying to install Laravel for first time, and I want to install version 9, so I follow steps in the documentation:
composer create-project laravel/laravel example-app
cd example-app
php artisan serve
but then when I check the version, I find that its 5.4.36
and I can’t find a way to upgrade it.
Note: I already have PHP 8 , MYSQL and Composer.
3
Answers
laravel/installer is a CLI tool for the init laravel project. and this cmd globally installed that CLI tool in the system. after that laravel new project-name init a project.
The 5.4.36 that you get, is the version of Laravel Installer.
if you Run php artisan –version in your folder where you installed your project you will be able to see your laravel framework version. Which should be 9.
if not try this code:
composer create-project laravel/laravel first-laravel9
Because you checked Laravel global installer version that responsible for install the full packages and laravel app, you run this command:
But If you want to check laravel app first install laravel app and go to the project and check the version by this commands: