title: How to solve Exception It is unsafe to run Dusk in production in laravel 5.5?
body: <p>I upgrated my project from laravel 5.4 to laravel 5.5 ,</p>
  
  <p>I dont have any problem in local env but in server i get this exception ,</p>
  
  <p>I searched a lot and i know this issue may be duplicated but no solutions solved my problem!</p>
  
  <p>How can i not registering dusk when environment is production?</p>
  
  <p>i wrote this code in AppServiceProvider.php :</p>
  
  <pre><code>public function register()
  {
      // Dusk, if env is appropriate
      if ($this-&gt;app-&gt;environment('local', 'testing')) {
          $this-&gt;app-&gt;register(DuskServiceProvider::class);
      }
  }
  </code></pre>
  
  <p>but it seems not working.
  can anyone help?</p>
  
  <p>EDITED :
  my composer.json file:</p>
  
  <pre><code> "require-dev": {
      "filp/whoops": "~2.0",
      "fzaninotto/faker": "~1.4",
      "mockery/mockery": "1.*",
      "phpunit/phpunit": "^7.0.3",
      "symfony/css-selector": "4.0.*",
      "symfony/dom-crawler": "4.0.0",
      "barryvdh/laravel-ide-helper": "^2.4",
      "laravel/dusk": "^2.0"
    },
  </code></pre>
  
  <p>The Exception is :</p>
  
  <pre><code>Exception
  It is unsafe to run Dusk in production.
  </code></pre>