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

推荐答案

Got it! ....

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

$app->run();

to

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

不知道为什么,也许你知道.

Laravel相关问答推荐

@vite指令在使用laravel vite构建后导致错误

哈希:check()不返回预期结果Laravel 10

在Laravel Sail Docker环境中的PHPMyAdmin中出现`Out of Memory‘错误

阻止用户查看其他用户正在查看的内容的最佳方法是什么?

如何在 laravel 5.8 中显示自定义消息?

Eloquent/Laravel:是否有 object->load('relation') 的对应物,例如.object->unload('relation')?

Laravel created_at 返回对象代替数据库中的日期格式?

在 Laravel 5 中添加新配置文件不起作用

Laravel 路由将变量传递给控制器

如何在使用 Laravel 在控制器中发送邮件之前更改邮件配置?

未找到 PHP 5.4 和 Laravel 类Memcached

Laravel Blade 没有额外的空格?

将 hasOne 模型附加到另一个 Laravel/Eloquent 模型而不指定 id

计算laravel中查询返回的行数

如何在 Laravel 5.1 中为Electron邮件添加标题

Laravel 初学者的良好开端

在 Laravel 应用程序中在哪里指定应用程序版本?

Grammar::parameterize() 必须是数组类型

Laravel 验证存在于不存在的地方

将值插入隐藏输入 Laravel Blade