Sonny
Sonny

Reputation: 8326

Laravel Install with Composer is Creating Two composer.json Files

I am just getting started both with Composer and Laravel.

I used Composer to include the Laravel installer:

"require": {
    "laravel/installer": "v1.3.5"
}

When I ran the Laravel installer, it created a subdirectory with the name specified in the command: laravel new name. My project now has a composer.json file in both the root folder and the Laravel installation sub-folder.

Is this what's supposed to happen? It seems to me that I should only have one composer.json per project.

Upvotes: 0

Views: 426

Answers (1)

Rana Ghosh
Rana Ghosh

Reputation: 4674

The best way to create a Laravel project using composer as describes below:: (on windows)

  1. First go to file directory where you want to create the Laravel project say "C:\xampp\htdocs\laravel_5_4"
  2. Press Alt+d then you will see directy URL will be highlighted, then type "cmd" and press Enter and command promt should appear.
  3. Then just copy these code "composer create-project laravel/laravel ./ "5.4.*" --prefer-dist" and press Enter.

Sit back and relax, you are done.
Note: You can change the version as you want.

Upvotes: 1

Related Questions