How to update Laravel command?

Viewed 31024

I used this command for installing Laravel:

composer global require "laravel/installer"

For creating a project I use :

laravel new project

Today Laravel 5.7 was released, and I'm looking for installing it using the laravel command but I couldn't do it. Instead, a new laravel project was created with Laravel 5.6.33. I need some help.

Note: I can create a project with Laravel 5.7 with this command, but I need to update my required Laravel and make a project with laravel 5.7 by using the laravel command:

composer create-project --prefer-dist laravel/laravel blog
5 Answers

If you want to globally update Laravel to the new version just run

composer global require laravel/installer`

to update globally

Update your laravel/framework dependency to 5.7.* in your composer.json file.

Run this command

composer update

composer create-project --prefer-dist laravel/laravel blog

I think that Laravel 5.7 Installation Documentation, has the exact instructions for your problem.

  • Install the Laravel Installer via composer: composer global require "laravel/installer"
  • Run the command: laravel new <project-name>

Try this to update laravel installer on global level:

composer global update

try this command

composer create-project --prefer-dist laravel/laravel blog "5.7.*"
Related