Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel请求绑定到容器中的位置?_Php_Laravel_Laravel 5_Laravel 5.3 - Fatal编程技术网

Php Laravel请求绑定到容器中的位置?

Php Laravel请求绑定到容器中的位置?,php,laravel,laravel-5,laravel-5.3,Php,Laravel,Laravel 5,Laravel 5.3,我知道Laravel将请求绑定到容器中,因为helper方法从容器中解析请求,如下所示: function request($key = null, $default = null) { if (is_null($key)) { return app('request'); } if (is_array($key)) { return app('request')->only($key); } return app

我知道Laravel将请求绑定到容器中,因为helper方法从容器中解析请求,如下所示:

function request($key = null, $default = null)
{
    if (is_null($key)) {
        return app('request');
    }

    if (is_array($key)) {
        return app('request')->only($key);
    }

    return app('request')->input($key, $default);
}

但是,请求在什么时候被绑定到容器中?我似乎找不到它。

Laravel请求对象已绑定并从多个服务提供商处恢复

您可以在Laravel框架中找到以下内容:


,并且

谢谢,我正在寻找发生这种情况的内核实例。干杯