简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM