如何安装Laravel 5.0 [英] How to install Laravel 5.0
问题描述
我无法获取Laravel 5.0的测试实例并开始运行,因此我可以协助此过渡。
1)从 https://github.com/laravel/laravel/tree/develop 导致在运行<$ c $时出现以下错误c> composer install 。
{error:
{type: ErrorException,
message:Undefined index:timezone,
file:\ / Projects \ / indatus \ / dispatcher-test-app\ / vendor \ /laravel\/framework\/src\/Illuminate\/Foundation\/start.php,
line:167}
}
{error:
{type:ErrorException,
message:Undefined index:timezone,
file:\ / Projects \ / indatus \ / dispatcher- test-app\ / vendor\ / laravel\ / framework\ / src\ / Illuminate \ / Foundation \ / start.php,
line:167}}
我完全缺少某些东西?
:这个问题/答案只有在Laravel 5处于开发阶段才有意义。您现在应参考 Laravel文档了解如何安装Laravel 。
由于Laravel 5已经是最终版本,要安装它,您应该运行
composer create-project laravel / laravel test-laravel-5-project --prefer-dist
在您的控制台。 test-laravel-5-project
是你可以调用它的任何你想要的项目的名称 - 例如myblog,myapp等Laravel文件将放在这个目录
您也可以使用替代方法
composer global requirelaravel /installer=~1.1
,然后运行
laravel new test-laravel-5-project
有关详细信息,请查看官方Laravel安装说明
< hr>
下面的答案只是因为历史原因而被保存,当Laravel 5仍处于开发阶段时,它是有效的。您现在应该只使用上述方法
我刚刚测试过这个,有两种安装Laravel 5的方法: p>
一步法
您只需执行:
composer create-project laravel / laravel test-laravel-5-project dev-develop --prefer-dist
并且作曲家将创建整个目录结构。在上面的命令 test-laravel-5-project
是你的项目名称 - 你当然可以命名为你想要的(composer将创建这个名称的目录,并放所有Laravel5文件
- 使用选项<$ c $下载 https://github.com/laravel/laravel/tree/develop c>下载ZIP
- 在网络目录中解压缩
- 运行
composer update $
在浏览器中为您的项目运行URL时使用这两种方法(例如 请尝试一个,以最适合您的方式。 I'm having trouble getting a test instance of Laravel 5.0 up and running so I can assist with this transition. 1) Creating a new app from https://github.com/laravel/laravel/tree/develop leads to the following error when running Am I completely missing something? UPDATE: This question/answer was only relevant when Laravel 5 was in the development stage. You should now reference the Laravel Documentation for how to install Laravel As Laravel 5 is already final release, to install it, you should run in your console. You can also use alternative method using and then running For detailed info you should look at official Laravel installation notes The below answer is being kept only for historical reasons and it was valid when Laravel 5 still was in its development stages. You should now only use the method mentioned above I've just tested this and there are two ways of installing Laravel 5: One-step method You just run: and composer will create the whole directory structure. In above command Multi-step method Using both methods when you run URL for your project in the browser (for example Both methods should work well. Give either one a try, whichever works best for you. 这篇关于如何安装Laravel 5.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
($
composer install
http:// localhost / projects / test-laravel-5-project / public
在您的网络服务器设置),您将获得标准的Laravel网站您已经到达。
composer install
.{"error":
{"type":"ErrorException",
"message":"Undefined index: timezone",
"file":"\/Projects\/indatus\/dispatcher-test-app\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/start.php",
"line":167}
}
{"error":
{"type":"ErrorException",
"message":"Undefined index: timezone",
"file":"\/Projects\/indatus\/dispatcher-test-app\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/start.php",
"line":167}}
composer create-project laravel/laravel test-laravel-5-project --prefer-dist
test-laravel-5-project
is the name of your project you can call it anyway you want - for example myblog, myapp etc. Laravel files will be put inside this directorycomposer global require "laravel/installer=~1.1"
laravel new test-laravel-5-project
composer create-project laravel/laravel test-laravel-5-project dev-develop --prefer-dist
test-laravel-5-project
is your project name - you can of course name it as you want (composer will create directory with this name and put all Laravel5 files inside this directory)
Download ZIP
composer update
(not composer install
) in directory where you unpacked your ZIP filehttp://localhost/projects/test-laravel-5-project/public
depending on your webserver settings ) you will get standard Laravel website You have arrived.