Lumen框架路由错误


Lumen framework routing error

我是Lumen框架的初学者。我有一些问题。Lumen路由不工作或我的错误。

$app->get('/front', function(){
    return 'Front';
});

错误为

NotFoundHttpException in Application.php line 1256:
in Application.php line 1256
at Application->handleDispatcherResponse(array('0')) in Application.php line 1212
at Application->Laravel'Lumen'{closure}() in Application.php line 1442
at Application->sendThroughPipeline(array(), object(Closure)) in Application.php line 1213
at Application->dispatch(object(Request)) in Application.php line 1153
at Application->run(object(Request)) in index.php line 29

我已经编辑了app.php Dotenv,withFacades()withEloquent(),未注释。和public/index.php编辑的

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

对不起我的英语。请帮帮我。

我认为您应该将index.php中的代码替换为:

$app->run();

带有:

$app->run($app['request']);

希望它能帮助你运行你的应用程序。你也可以在这里查看它安装&修正流明错误。