【问题标题】:laravel 5.7: RedirectResponse::__construct() problemlaravel 5.7:RedirectResponse::__construct() 问题
【发布时间】:2019-08-25 01:31:51
【问题描述】:

[larvel 5.7] 参数 2 传递给 Symfony\Component\HttpFoundation\RedirectResponse::__construct() 必须 是 int 类型,给定数组,调用 C:\xampp\htdocs\ecole\vendor\laravel\framework\src\Illuminate\Routing\Redirector.php 在第 203 行

【问题讨论】:

  • 请为正在发生的事情和您正在尝试做的事情添加一些上下文
  • 问题已解决

标签: laravel-5.7


【解决方案1】:
namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array
     */
    protected $proxies;

    /**
     * The headers that should be used to detect proxies.
     *
     * @var string
     */
    protected $headers = Request::HEADER_X_FORWARDED_ALL;
}

【讨论】:

    猜你喜欢
    • 2019-02-11
    • 2019-07-03
    • 2019-04-20
    • 1970-01-01
    • 2020-07-31
    • 2019-12-12
    • 2019-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多