Lumen not working out of the box

守給你的承諾、 提交于 2019-11-30 13:53:23

Open your terminal in the root folder run the following command php artisan serve.

Lumen development server started on http://localhost:8000/

if You want to access lumen project without "php artisan serve"

$app->run(); replace with $request = Illuminate\Http\Request::capture(); $app->run($request); from this path yourlumenproject/public/index.php

if you want to serve your app in local development you can do this :

php -S localhost:8000 -t public/

and it will serve in localhost in port 8000. hope this help.

Note : I'm using Laravel Framework version Lumen (5.2.4) (Laravel Components 5.2.*)

At the moment Lumen only runs in the domain root.
(I've submitted a PR that fixes this but it has yet to be merged)

You have to create a Virtual Host on your local webserver and point the document root of that to the public directory. After that you can access your app with something like: http://lumen.dev.

A simple alternative to setting this up manually is Laravel Homestead. It is an official Vagrant box made for Laravel, that allows you to easily get your development environment up and running.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!