流明安装错误

时间:2016-03-13 19:03:54

标签: lumen lumen-5.2 lumen-routing

我正在尝试用作曲家安装流明,所以我使用了下面的命令

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

1 个答案:

答案 0 :(得分:3)

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

$app->run();

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

这对我有用。