Laravel 5 - “laravel new”命令

时间:2015-04-26 08:38:08

标签: composer-php laravel-5

帮助人们安装Laravel 5,

我正在使用Windows 7 Home premium

我正在使用Git bash作为我的终端

我运行命令

composer global require "laravel/installer=~1.1"

它已成功安装

但是当我跑步时

laravel new blog

它显示以下信息:

Crafting application...
'composer' is not recognized as an internal or external command, operable program or batch file.
Application ready! Build something amazing.

有一条错误消息“'作曲家'无法识别....”。 为什么这发生在我身上? composer命令工作正常。 :(

我已经将路径“; C:\ Users \ username \ AppData \ Roaming \ Composer \ vendor \ bin”添加到我的系统变量

2 个答案:

答案 0 :(得分:1)

运行命令install Laravel:

composer create-project laravel/laravel --prefer-dist

http://laravel.com/docs/5.0/installation

答案 1 :(得分:0)

解决!试图在我的办公室重新安装它。

似乎我在家的互联网连接阻止了一些网站并运行此命令

    class Animal:
        def __innit__(self, animal_type, name):
            self.animal_type = animal_type
            self.name = name
        def get_animal_type(self, animal_type):
            self.__animal_type = animal_type
        def get_name(self, name):
            self.__name = name
        def check_mood(self, mood):
            input random.txt
            print random.random()

    Class Zoo:
        def __innit__(self):
            self.__animals = animal_list
        def add_animals(self, animal):
            self.__animals.append(animal)
        def show_animals(animal_list):
            return animal_list

    input Animal.py
    input Zoo.py
    def main():
        ADD_ANIMAL = 1
        SHOW_ANIMALS = 2
        EXIT = 3
        def get_manu_choice():
            print()
            print("Zoo Options")
            print("-----------")
            print("1. Add Animal")
            print("2. Show Animals")
            print("3. Exit")
            print()
        choice = int(input("What would you like to do? "))
        while choice < ADD_ANIMAL or choice > EXIT:
            choice = int(input("Please choose a valid option: "))
        return choice
    main()

安装了不完整的laravel安装程序。