命令“服务”未定义(Lumen-Laravel)

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

Command "serve" is not defined (Lumen-Laravel)

laravelartisanlumenlumen-5.2

提问by apapipip

So, i try to install the lumen restful api. Based on tutorial, i have to "serve" on php artisan. The command be like:

所以,我尝试安装 lumen restful api。根据教程,我必须在 php artisan 上“服务”。命令如下:

php artisan serve sample_api sample_api/public

php 工匠服务 sample_api sample_api/public

then it shows:

然后它显示:

Command "serve" not defined.

命令“服务”未定义。

Some say that serve command has been deleted in laravel 5 (which i use it). if so, what command should i use? or maybe find another tutorial?

有人说在 laravel 5(我使用它)中删除了 serve 命令。如果是这样,我应该使用什么命令?或者找另一个教程?

Ps: Im a newbie :)

Ps:我是新手:)

Thanks a lot!

非常感谢!

回答by Oussema Chaabouni

You can use

您可以使用

php -S localhost:8080 -t public/

回答by Alexey Mezenin

This command was removed from Lumen 5.2. You can use any other web server to run your app. I'd recommend to learn Homesteadwith built-in environment. If you're newbie, you can use something like WAMP.

此命令已从 Lumen 5.2 中删除。您可以使用任何其他 Web 服务器来运行您的应用程序。我建议学习内置环境的Homestead。如果你是新手,你可以使用类似WAMP 的东西。