Reputation: 15
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.
Upvotes: 0
Views: 1274
Reputation: 122
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.
Upvotes: 1