misman
misman

Reputation: 1385

Laravel - Generating composer.json and artisan files?

I downlaod composer.phar and move to /usr/local/bin/ directory as composer, then I download laravel with

composer global require "laravel/installer=~1.1"

After I linked laravel to /usr/local/bin/ , I run "laravel new test" and I get

Composer could not find a composer.json file in /home/user/test To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section

So laravel doesn't generate composer.json and artisan files Can you help why?

Edit
I was going to format PC for some reasons. After I had formatted PC, I did above steps again and it worked.

laravel new hello

is working now

Upvotes: 1

Views: 988

Answers (2)

Nehal Hasnayeen
Nehal Hasnayeen

Reputation: 1223

you should link your laravel to \composer\vendor\bin folder. After downloading the laravel installer run this command

export PATH="$PATH:~/.composer/vendor/bin"

and then run your laravel command.

Upvotes: 0

mydo47
mydo47

Reputation: 379

If you want to install Laravel at current folder. You don't use global:

composer require "laravel/installer=~1.1"

Upvotes: -1

Related Questions