如何安装 Laravel 5.4?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41838979/
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
How to install Laravel 5.4?
提问by mySun
I heard Laravel 5.4 will be unveiled tomorrow.
听说明天 Laravel 5.4 就要揭晓了。
How to install (Laravel 5.4) the Beta version?
如何安装 (Laravel 5.4) Beta 版?
Do you know the new features?
你知道新功能吗?
回答by
You can download Laravel 5.4 with this command:
您可以使用以下命令下载 Laravel 5.4:
composer create-project --prefer-dist laravel/laravel projectName 5.4
# or use `5.4.*` for latest version
回答by Umair Mehmood
Go to your respective server folder like xampp or wamp with cmd and type the given command
使用 cmd 转到您各自的服务器文件夹,如 xampp 或 wamp 并键入给定的命令
composer create-project --prefer-dist laravel/laravel projectName 5.4
回答by Denis Priebe
There are multiple ways to install Laravel. One of the simplest ways would be to install through composer with the command: composer create-project --prefer-dist laravel/laravel MyAppName
.
Laravel 有多种安装方式。最简单的方法之一是通过 composer 使用以下命令进行安装:composer create-project --prefer-dist laravel/laravel MyAppName
.
All of the documentation for installing laravel 5.4 can be found here: https://laravel.com/docs/5.4/installation
可以在此处找到有关安装 laravel 5.4 的所有文档:https://laravel.com/docs/5.4/installation
The new features are covered on laracasts and on the docs. Here is a link to some of the new features: https://laracasts.com/series/whats-new-in-laravel-5-4
laracasts 和文档中介绍了新功能。以下是一些新功能的链接:https: //laracasts.com/series/whats-new-in-laravel-5-4
回答by Amjith
composer create-project laravel/laravel <project_name> "5.4.*" --prefer-dist
回答by Harish Patel
There is two way for installing laravel new fresh project in our system.
在我们的系统中安装 Laravel 新项目有两种方式。
- With the composer
- With the Laravel installer
- 与作曲家
- 使用 Laravel 安装程序
Method 1: The composer
方法一:作曲家
- We have first need to install composer globally in our system. Download the composerand install it.
- Now we create a directory in our system to store the new project.
- Go to the directory and open the command line. Simply run this command to create a new project:
composer create-project --prefer-dist laravel/laravel blog
. It will create a blog folder in your directory. It will take a couple of time.
- 我们首先需要在我们的系统中全局安装 composer。 下载 Composer并安装它。
- 现在我们在我们的系统中创建一个目录来存储新项目。
- 转到目录并打开命令行。只需运行此命令即可创建一个新项目:
composer create-project --prefer-dist laravel/laravel blog
. 它将在您的目录中创建一个博客文件夹。这将需要一些时间。
Ok, we got the new blog project by the composer.
好的,我们得到了 Composer 的新博客项目。
Method 2: The Laravel installer
方法 2:Laravel 安装程序
Laravel provides the convenient way to install Laravel new project.
Laravel 提供了安装 Laravel 新项目的便捷方式。
We install Laravel installer globally:
composer global require "laravel/installer"
Make sure to place the directory (or the equivalent directory for your OS) in your $PATH so the executable can be located by your system.
For create new project with Laravel installer we just have run:
laravel new blog
我们在全局安装 Laravel 安装程序:
composer global require "laravel/installer"
确保将目录(或您操作系统的等效目录)放在 $PATH 中,以便您的系统可以找到可执行文件。
为了使用 Laravel 安装程序创建新项目,我们只需运行:
laravel new blog
For more information, you can check Laravel official documentationwhich will help you a lot.
有关更多信息,您可以查看Laravel 官方文档,这将对您有很大帮助。
回答by Navendu Kumar
Step1: open the link => https://laravel.com/docs/5.4/installation
Step1:打开链接=> https://laravel.com/docs/5.4/installation
Step2: Download & install => composer
步骤 2:下载并安装 => composer
Step3: Open Command Prompt
第三步:打开命令提示符
Step4: Change your path to Xampp, go to your htdocs and enter composer create-project --prefer-dist laravel/laravel =5.4
步骤 4:更改 Xampp 的路径,转到您的 htdocs 并输入 composer create-project --prefer-dist laravel/laravel =5.4
回答by Nayeem Hyder Riddhi
In windows CTRL + SHIFT + Right click your folder where you want to install your laravel project and then you will find command prompt. and then just type in command prompt
在 Windows 中 CTRL + SHIFT + 右键单击要安装 Laravel 项目的文件夹,然后您将找到命令提示符。然后只需输入命令提示符
composer create-project --prefer-dist laravel/laravel projectName 5.4
回答by Mahmoud Ali Kassem
Install composer from here: https://getcomposer.org/download/
Make Sure Your Server meeting these requirements (related to installed version Laravel 5.4) - https://laravel.com/docs/5.4#installation:
- PHP >= 5.6.4
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension XML PHP Extension
Download Laravel Installer using this code:
composer global require "laravel/installer"
Create Laravel project using this code:
- Install custom version (Use this one):
composer create-project --prefer-dist laravel/laravel blog "5.4.*"
- Install default version:
laravel new blog
从这里安装作曲家:https: //getcomposer.org/download/
确保您的服务器满足这些要求(与安装的Laravel 5.4版本相关 ) - https://laravel.com/docs/5.4#installation:
- PHP >= 5.6.4
- OpenSSL PHP 扩展
- PDO PHP 扩展
- Mbstring PHP 扩展
- Tokenizer PHP 扩展 XML PHP 扩展
使用以下代码下载 Laravel 安装程序:
composer global require "laravel/installer"
使用以下代码创建 Laravel 项目:
- 安装自定义版本(使用这个):
composer create-project --prefer-dist laravel/laravel blog "5.4.*"
- 安装默认版本:
laravel new blog
回答by Gammer
Install composer For windows, Click here to Download composer
For debain, Go to terminal,
cd /usr/src
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Type
composer --version
in terminal.For ubuntu just enter
sudo apt-get install composer
安装 composer 对于 windows,点击这里下载 composer
对于 debain,转到终端,
cd /usr/src
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
输入
composer --version
端子。对于 ubuntu 只需输入
sudo apt-get install composer
If you are using Xampp
then go to your htdocs
and enter composer create-project --prefer-dist laravel/laravel test-app
如果您正在使用,Xampp
则转到您的htdocs
并输入composer create-project --prefer-dist laravel/laravel test-app
Your laravel framework will download with name test-app
the version will be 5.4
.
您的 Laravel 框架将下载名称test-app
为5.4
.
Follow the documentation for the rest.
其余的请按照文档进行操作。
回答by ahmed sdiri
Download the Laravel installer using Composer: composer global require "laravel/installer" Create a fresh Laravel installation in the directory you specify: laravel new Creating the project: composer create-project --prefer-dist laravel/laravel blog "5.4.*" launching on the local server: php artisan serve The you can chech thanks to the given url your web application
使用 Composer 下载 Laravel 安装程序: composer global require "laravel/installer" 在您指定的目录中创建全新的 Laravel 安装:laravel new 创建项目:composer create-project --prefer-dist laravel/laravel blog "5.4.*"在本地服务器上启动: php artisan serve 您可以通过给定的 url 检查您的 Web 应用程序