dousi1906 2015-11-16 04:11
浏览 68

流明框架路由错误

i'm beginner Lumen framework. I have some problems. Lumen routing not working or my mistakes.

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

Error is

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

And I already edited app.php Dotenv, withFacades(), withEloquent() uncommented. And public/index.php edited

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

Sorry for my english. Please help me.

  • 写回答

1条回答 默认 最新

  • drju37335 2016-06-20 12:48
    关注

    I think you should replace the code in index.php from:

    $app->run();
    

    with:

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

    Hope it will help you to run your application. You can also check it here as well Install & fix Lumen Errors.

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口