php Laravel 5.5 安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44963616/
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-08-26 03:03:32  来源:igfitidea点击:

Laravel 5.5 install

phplaravel

提问by Carloscito

When I try to install Laravel 5.5 with laravel new project --dev

当我尝试安装 Laravel 5.5 时 laravel new project --dev

[Symfony\Component\Debug\Exception\FatalThrowableError]           
  Parse error: syntax error, unexpected '<<' (T_SL), expecting ']' 

It is just me or because it is not release yet?

这只是我还是因为它还没有发布?

EDIT: Btw, it is when I try to make php artisan key:generate... If I put any key in .env it works...

编辑:顺便说一句,这是当我尝试制作php artisan key:generate...如果我在 .env 中放入任何键,它会起作用...

Thanks

谢谢

回答by shalini

composer create-project laravel/laravel blog  "5.5.*" --prefer-dist

回答by Roberto

To install Laravel 5.5 you need launch composer create-project as usual and you need to set the “dev-develop” version of the laravel/laravel package:

要安装 Laravel 5.5,你需要像往常一样启动 composer create-project 并且你需要设置 laravel/laravel 包的“dev-develop”版本:

composer create-project --prefer-dist laravel/laravel blog dev-develop

Where:

在哪里:

  • laravel/laravel: is the package for Laravel installation;
  • blog: is the new directory for your new project (you can change it);
  • dev-develop: is the next version of Laravel.
  • laravel/laravel: 是 Laravel 安装包;
  • blog:是你的新项目的新目录(你可以改变它);
  • dev-develop:是 Laravel 的下一个版本。

Yuo can find more information here https://medium.com/@robertodev/how-to-install-laravel-5-5-dev-d721873a8c89

你可以在这里找到更多信息 https://medium.com/@robertodev/how-to-install-laravel-5-5-dev-d721873a8c89

回答by Sn00ch

I had the same problem. For me even

我有同样的问题。甚至对我来说

php artisan

did not work.

不工作。

I fixed it with a simple

我用一个简单的方法修复了它

cd /my/project/folder
composer update
php artisan key:generate

in the console.

在控制台中。

Hope this helps.

希望这可以帮助。

回答by itskawsar

This is happening because of your Laravel Installerversion. I have faced the same problem.

这是因为您的Laravel 安装程序版本。我遇到了同样的问题。

Run following command:

运行以下命令:

composer global update(it will update your Laravel Installer)

composer global update(它会更新你的 Laravel 安装程序)

If you don't want to install again, then fix by following command:

如果您不想再次安装,请通过以下命令进行修复:

composer update(from your project directory and it will update your project files)

composer update(来自您的项目目录,它将更新您的项目文件)

Additional:

额外的:

Sometimes, it may cause of Composerversion. You can update your composer version by following command: composer self-update

有时,这可能是Composer版本的原因。您可以通过以下命令更新您的 Composer 版本: composer self-update

Then you can update your project files.

然后您可以更新您的项目文件。

Hope this answer will help you.

希望这个回答能帮到你。