title: Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1
body: <p>I'm in the process of upgrading my Laravel 5.1 to Laravel 5.7</p>
  <p>I ran this <code>composer update</code></p>
  <pre><code>Writing lock file
  Generating autoload files
  &gt; php artisan clear-compiled
  
  In RouteServiceProvider.php line 40:
                                           
    Class 'App\Providers\Route' not found  
                                           
  
  Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1
  ⚡️  bheng  composer update
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Nothing to install or update
  Generating autoload files
  &gt; php artisan clear-compiled
  
  In RouteServiceProvider.php line 40:
                                           
    Class 'App\Providers\Route' not found  
                                           
  
  Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1
  </code></pre>
  <blockquote>
  <p>Class 'App\Providers\Route' not found</p>
  </blockquote>
  <hr />
  <h1>RouteServiceProvider</h1>
  <pre><code>&lt;?php namespace App\Providers;
  
  use Illuminate\Routing\Router;
  use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
  
  class RouteServiceProvider extends ServiceProvider {
  
      /**
       * This namespace is applied to the controller routes in your routes file.
       *
       * In addition, it is set as the URL generator's root namespace.
       *
       * @var string
       */
      protected $namespace = 'App\Http\Controllers';
  
      /**
       * Define your route model bindings, pattern filters, etc.
       *
       * @param  \Illuminate\Routing\Router  $router
       * @return void
       */
       public function boot(){
          parent::boot();
      }
  
      /**
       * Define the routes for the application.
       *
       * @param  \Illuminate\Routing\Router  $router
       * @return void
       */
      public function map()
      {
          $this-&gt;mapWebRoutes();
      }
  
      protected function mapWebRoutes()
      {
          Route::group([
               'middleware' =&gt; 'web',
               'namespace' =&gt; $this-&gt;namespace,
           ], function ($router) {
               require base_path('routes/web.php');
           });
       }
  
  }
  </code></pre>
  <p>Does anyone know how to prevent this issue ?</p>