我正在尝试使用composer安装流明,因此我使用了以下命令
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
假设您正在子目录中运行流明,请在public / index.php中进行更改:
$app->run();
到
$request = Illuminate\Http\Request::capture();
$app->run($request);
那对我有用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句