title: Getting error while updating laravel from 5.5 to 5.7 (Undefined class constant 'HEADER_CLIENT_IP')
body: <p>i am getting this error.</p>
  
  <blockquote>
    <p>Undefined class constant 'HEADER_CLIENT_IP' Script @php artisan
    package:discover handling the post-autoload-dump event returned with
    error code 1</p>
  </blockquote>
  
  <p>I changed </p>
  
  <pre><code>app\Http\Middleware\TrustedProxies.php by:
  
      &lt;?php
  
    namespace App\Http\Middleware;
  
    use Illuminate\Http\Request;
    use Fideloper\Proxy\TrustProxies as Middleware;
  
    class TrustProxies extends Middleware
    {
      protected $proxies;
      protected $headers = Request::HEADER_X_FORWARDED_ALL;
    }
  </code></pre>
  
  <p>Here is my .composerjson file</p>
  
  <pre><code>{
      "name": "laravel/laravel",
      "description": "The Laravel Framework.",
      "keywords": ["framework", "laravel"],
      "license": "MIT",
      "type": "project",
      "require": {
          "php": "&gt;=7.0.0",
          "fideloper/proxy": "~3.3",
          "laravel/framework": "5.7.*",
          "laravel/tinker": "~1.0",
          "tymon/jwt-auth": "^0.5.12"
      },
      "require-dev": {
          "filp/whoops": "~2.0",
          "fzaninotto/faker": "~1.4",
          "mockery/mockery": "~1.0",
          "phpunit/phpunit": "~6.0",
          "symfony/thanks": "^1.0"
      },
      "autoload": {
          "classmap": [
              "database/seeds",
              "database/factories"
          ],
          "psr-4": {
              "App\\": "app/"
          }
      },
      "autoload-dev": {
          "psr-4": {
              "Tests\\": "tests/"
          }
      },
      "extra": {
          "laravel": {
              "dont-discover": [
              ]
          }
      },
      "scripts": {
          "post-root-package-install": [
              "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
          ],
          "post-create-project-cmd": [
              "@php artisan key:generate"
          ],
          "post-autoload-dump": [
              "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
              "@php artisan package:discover"
          ]
      },
      "config": {
          "preferred-install": "dist",
          "sort-packages": true,
          "optimize-autoloader": true
      } }
  </code></pre>
  
  <p>I am still handling the same error. Can you guys figure it out where the problem is ? </p>