如何在新安装时指定 Lumen(或 Laravel)版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36174497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 13:27:56  来源:igfitidea点击:

How to specify Lumen (or Laravel) version on new installation?

laravellumen

提问by Ifnot

I want to install a specific version of Laravel Lumen (5.1 instead of the lastest one 5.2) on a new project.

我想在新项目上安装特定版本的 Laravel Lumen(5.1 而不是最新的 5.2)。

From the documentation :

从文档:

lumen new blog

or :

或者 :

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

Does not work : it install the lastest one.

不起作用:它安装最新的。

回答by Ifnot

Create a project using the composer command :

使用 composer 命令创建一个项目:

Create a Laravel 5.1 project into the blog folder :

在 blog 文件夹中创建一个 Laravel 5.1 项目:

composer create-project laravel/laravel blog "5.1.*"

Create a Lumen 5.1 project into the blog folder :

在博客文件夹中创建一个 Lumen 5.1 项目:

composer create-project laravel/lumen blog "5.1.*"