Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run composer.json?

{     "name": "laravel/laravel",     "description": "The Laravel Framework.",     "keywords": ["framework", "laravel"],     "license": "MIT",     "require": {         "laravel/framework": "4.1.*"     },     "autoload": {         "classmap": [             "app/commands",             "app/controllers",             "app/models",             "app/database/migrations",             "app/database/seeds",             "app/tests/TestCase.php"         ]     },     "scripts": {         "post-install-cmd": [             "php artisan clear-compiled",             "php artisan optimize"         ],         "post-update-cmd": [             "php artisan clear-compiled",             "php artisan optimize"         ],         "post-create-project-cmd": [             "php artisan key:generate"         ]     },     "config": {         "preferred-install": "dist"     },     "minimum-stability": "stable" } 

I'am executing this in my windows console:

php composer.json create-project test2 

I just get the above string and nothing happens? how to properly run the composer.json to create a project?

like image 271
user3350814 Avatar asked Mar 02 '14 08:03

user3350814


People also ask

Where is Composer json in Windows?

You should put the composer. json file in your website's root directory. Then, in your terminal, go to the folder where you put the file (e.g. cd C:\xampp\htdocs\mywebsite ) and then type composer install . That should be it.


2 Answers

You must download composer:

curl -sS https://getcomposer.org/installer | php 

or

php -r "readfile('https://getcomposer.org/installer');" | php 

and next you should run if you have composer.json file:

composer.phar install 

or if you want create new project

composer.phar create-project 
like image 119
krynio Avatar answered Sep 21 '22 13:09

krynio


use composer update in the same folder that has composer.json, when the composer command (eg. test with composer --version) already exists in your terminal.

like image 40
Aminah Nuraini Avatar answered Sep 21 '22 13:09

Aminah Nuraini