Just installed Lumen and got NotFoundHttpException

robertsan picture robertsan · Apr 5, 2016 · Viewed 13.4k times · Source

I'm searching for a solution ... it's getting so frustrating. After a fresh installation of Lumen by Laravel, I simply can't access the "/" route. When I try to, it throws an error:

NotFoundHttpException in RoutesRequests.php line 443:

in RoutesRequests.php line 443
at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 380
at Application->Laravel\Lumen\Concerns\{closure}() in RoutesRequests.php line 629
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

Answer

robertsan picture robertsan · Apr 5, 2016

Got it! ....

The solution is to change in public/index.php at line 28:

$app->run();

to

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

No clue why, maybe you know.