ifma
ifma

Reputation: 3818

Laravel Framework - Difference between creating a new project via laravel or composer?

Been following along several Laravel tutorials online and they all create a new project through either of these two commands:

laravel new project-name

or

composer create-project laravel/laravel project-name

They both seem to generate the same template, but are there any differences between the two one should know about? Laravel docs are unclear on this, and couldn't find an answer online, would appreciate if someone can clear it up for me.

Upvotes: 13

Views: 4914

Answers (1)

Andrew Hood
Andrew Hood

Reputation: 158

composer create-project laravel/laravel project-name will do two extra things as far as I know. These are executed because of scripts in composer.json

  1. cp .env.example .env
  2. ./artisan key:generate

composer.json

Upvotes: 9

Related Questions