今天發現之前基於5.5的教程支援5.7版本了.匆匆的去改 composer.json
laravel 版本號.執行 composer update 發現報錯了.
什麼鬼?.
查了網上解決辦法:
To make the switch:
1, In app/Http/Kernel.php, if \Fideloper\Proxy\TrustProxies::class is in your $middleware array, remove it. If \App\Http\Middleware\TrustProxies::class is not in your $middleware array, add it.
2, Open your app/Http/Middleware/TrustProxies.php file and update it with your proxies. (本地不存在,沒做修改)
3, Delete your config/trustedproxy.php file.(本地不存在,沒做修改)
4, Remove Fideloper\Proxy\TrustedProxyServiceProvider::class from your providers array in config/app.php. (配置裡沒有,不做修改)
5, Update your composer.json file to use "fideloper/proxy": "~4.0". Run composer update fideloper/proxy to update the package.
原文地址: https://stackoverflow.com/questions/485948...
本作品採用《CC 協議》,轉載必須註明作者和本文連結