skip to Main Content

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


  1. 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.

    composer global require laravel/installer
     
    laravel new example-app
     
    cd example-app
     
    php artisan serve
    
    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. Because you checked Laravel global installer version that responsible for install the full packages and laravel app, you run this command:

    laravel --version

    But If you want to check laravel app first install laravel app and go to the project and check the version by this commands:

    laravel new example_app

    cd example_app

    php artisan --version

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search