Javad
Javad

Reputation: 133

How to update Laravel command?

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

Upvotes: 6

Views: 48622

Answers (5)

James Christian Kaguo
James Christian Kaguo

Reputation: 1469

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

composer global require laravel/installer`

to update globally

Upvotes: 6

Christian Gallarmin
Christian Gallarmin

Reputation: 660

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

Upvotes: 3

MCFreddie777
MCFreddie777

Reputation: 1223

Try this to update laravel installer on global level:

composer global update

Upvotes: 4

Pedro Simão
Pedro Simão

Reputation: 293

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>

Upvotes: 1

Alexander Villalobos
Alexander Villalobos

Reputation: 461

try this command

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

Upvotes: 0

Related Questions