Laravel
and Lumen
快捷安装
Laravel
1 | composer global require "laravel/installer=~1.1" |
Lumen
1 | composer global require "laravel/lumen-installer" |
在Linux下全局使用
- 安装完laravel安装器后 设置laravel 的环境变量 这样 就可以 实现 laravel new 项目名 全局可用
1 | vi /etc/profile.d/laravel.sh |
1 | export PATH=$PATH:/root/.config/composer/vendor/bin/ |
Lumen 相同
FAQ
- sh: command not found laravel or lumen
1 | export PATH="~/.composer/vendor/bin:$PATH" |
vim ~/.zshrc
1 | alias laravel='~/.composer/vendor/bin/laravel' |
关闭终端输入 laravel new sites