【发布时间】:2018-02-10 23:18:23
【问题描述】:
我正在创建一个自定义守卫,我需要在其中访问 Request 对象以获取 http 标头。我试过request(),但它在流明中是未定义的。
如何在控制器类之外访问 Request 对象?
【问题讨论】:
-
Lumen 中没有
request助手:github.com/laravel/lumen-framework/blob/5.4/src/helpers.php 你试过使用Illuminate\Http\Request类吗?