NotFoundHttpException with Lumen

前端 未结 2 1457
我在风中等你
我在风中等你 2020-11-28 03:40

I\'ve just installed Lumen on Windows and unfortunately I\'m getting the following error:

NotFoundHttpException in Application.php line 1093:

in Application         


        
相关标签:
2条回答
  • 2020-11-28 04:01

    The problem was solved by changing the

    $app->run();
    

    in /public/index.php to

    $request = Illuminate\Http\Request::capture();
    $app->run($request);
    
    0 讨论(0)
  • 2020-11-28 04:19

    On your index.php file. Change this line

    $app->run();
    

    Into:

    $app->run($app->request);
    

    Update

    Using make method is faster than accessing class alias via array access.

    This one also works:

    $app->run(
        $app->make('request')
    );
    
    0 讨论(0)
提交回复
热议问题