我正在尝试用作曲家安装流明,所以我使用了下面的命令
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
答案 0 :(得分:3)
假设您正在从子目录运行流明,请在public / index.php中更改:
$app->run();
到
$request = Illuminate\Http\Request::capture();
$app->run($request);
这对我有用。