2

我正在尝试用 composer 安装 lumen 所以我使用了下面的命令

composer create-project --prefer-dist laravel/lumen api

但是,由于某种原因,我什至在做任何事情之前就收到了这个错误,只是访问了公共文件夹。

Sorry, the page you are looking for could not be found.

1/1
NotFoundHttpException in RoutesRequests.php line 442:
in RoutesRequests.php line 442
at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 381
at Application->Laravel\Lumen\Concerns{closure}() in RoutesRequests.php line 624
at Application->sendThroughPipeline(array(), object(Closure)) in RoutesRequests.php line 382
at Application->dispatch(null) in RoutesRequests.php line 327
at Application->run() in index.php line 28
4

1 回答 1

3

假设您正在从子目录运行 lumen,在 public/index.php 更改:

$app->run();

$request = Illuminate\Http\Request::capture();
$app->run($request);

这对我有用。

于 2016-03-14T00:59:38.070 回答