如果已经熟悉使用Nodejs
的话
npm install -g yo
没有的话,详细可见[Yeoman 快速上手]http://www.phodal.com/blog/yeoman-quick-start/
安装Laravel生成器
npm install -g generator-laravel
开始之前似乎还需要安装Composer
,这个生成器似乎有点小问题。
$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
官方推荐的方法
brew update
brew tap josegonzalez/homebrew-php
brew tap homebrew/versions
brew install php55-intl
brew install josegonzalez/php/composer
exe吧。 Composer-Setup.exe
直接用yo laravel
,结果如下
$yo laravel
____
\ \ _____________________
\ \ ____ | Laravel tools |
\ \ \ \ | |
\___\_____\___\ |_____________________|
\ \
\_____\
[?] What would you like to do? Install a new Laravel
[?] Where to install? ./
[?] Are you sure about cleaning and installing in ./?: Yes
info Start cleaning directory (./)
info Cleaning done
info Check composer install
conflict Composer is missing
info Composer has been found
info Composer has been found
conflict Laravel error PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with build ID=API20100525,NTS,debug
PHP compiled with build ID=API20100525,NTS
These options need to match
in Unknown on line 0
info composer : Installing laravel/laravel (v4.1.27)
info composer : - Installing laravel/laravel (v4.1.27)
info composer : Downloading: connection...
info composer :
info composer : Downloading: 0%
info composer :
info composer : Downloading: 10%
info composer :
围观我的Github Idea墙, 也许,你会遇到心仪的项目