Laravel/Lumen 安装器

Laravel and Lumen 快捷安装

Laravel

1
2
3
composer global require "laravel/installer=~1.1"

laravel new sites

Lumen

1
2
3
4
5
6
composer global require "laravel/lumen-installer"

# or
composer require laravel/lumen-installer

lumen new sites

在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
2
3
alias laravel='~/.composer/vendor/bin/laravel' 

source ~/.zshrc

关闭终端输入 laravel new sites

Powered by Hexo and Hexo-theme-hiker

Copyright © 2017 - 2023 Keep It Simple And Stupid All Rights Reserved.

访客数 : | 访问量 :