title: Uncaught RuntimeException: A facade root has not been set. in Facade.php:258 when upgrading to Laravel 7
body: <p>I got the error regarding facade even though I followed the laravel upgrade guide</p>
  
  <pre><code>PHP Fatal error:  Uncaught RuntimeException: A facade root has not been set. in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Faca
  des\Facade.php:258
  Stack trace:
  #0 D:\Git_Undiksha\legalisir-ijasah-online\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
  #1 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(366): App\Exceptions\Handler-&gt;report(Object(Error))
  #2 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Foundation\Console\Kernel-&gt;reportException
  (Object(Error))
  #3 D:\Git_Undiksha\legalisir-ijasah-online\artisan(35): Illuminate\Foundation\Console\Kernel-&gt;handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compo
  nent\Console\Output\ConsoleOutput))
  #4 {main}
    thrown in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 258
  
  Fatal error: Uncaught RuntimeException: A facade root has not been set. in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\F
  acade.php:258
  Stack trace:
  #0 D:\Git_Undiksha\legalisir-ijasah-online\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
  #1 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(366): App\Exceptions\Handler-&gt;report(Object(Error))
  #2 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Foundation\Console\Kernel-&gt;reportException
  (Object(Error))
  #3 D:\Git_Undiksha\legalisir-ijasah-online\artisan(35): Illuminate\Foundation\Console\Kernel-&gt;handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compo
  nent\Console\Output\ConsoleOutput))
  #4 {main}
    thrown in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 258
  </code></pre>
  
  <p>Facade.php:258</p>
  
  <pre><code>public static function __callStatic($method, $args)
  {
      $instance = static::getFacadeRoot();
  
      if (! $instance) {
          throw new RuntimeException('A facade root has not been set.');
      }
  
      return $instance-&gt;$method(...$args);
  }
  </code></pre>
  
  <p>Here is my composer.json:</p>
  
  <pre><code>"require": {
      "php": "&gt;=7.2.5",
      "laravel/framework": "^7.0",
      "nunomaduro/collision": "^4.1",
      "laravel/tinker": "^2.0",
      "facade/ignition": "^2.0"
  },
  "require-dev": {
      "composer/composer": "^1.10",
      "fzaninotto/faker": "~1.4",
      "mockery/mockery": "0.9.*",
      "phpunit/phpunit": "^9.1"
  },
  </code></pre>
  
  <p>I did change the Handler.php Exception to Throwable, session.php secure env from false to null, and set any handle() command return to integer.</p>
  
  <p>How do I solve the facade error and what should I do?</p>