Fatal error: Uncaught RuntimeException: A facade root has not been set

Hello,

I tried to upload my Laravel 5.8 from desktop to your free sevice. Performed with guild by @teodor

Deploying your Laravel Project to 000webhost

Open my website: https://davidjoker.000webhostapp.com

Error is http 500. Then I enable debug it show:

Fatal error : Uncaught RuntimeException: A facade root has not been set. in /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:236 Stack trace: #0 /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(407): Illuminate\Support\Facades\Facade::__callStatic(‘replaceNamespac…’, Array) #1 /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(384): Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths() #2 /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(295): Illuminate\Foundation\Exceptions\Handler->renderHttpException(Object(Symfony\Component\HttpKernel\Exception\HttpException)) #3 /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(192): Illuminate\Foundation\Exceptions\Handler->prepareResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\HttpEx in /storage/ssd1/863/10947863/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 236

Kindly help to resolve this.

Let’s try this:

  1. Navigate to bootstrap/app.php.
  2. Uncomment the following line (comments are usually //, remove them).
$app->withFacades();

So instead of

//$app->withFacades();

It’ll be

$app->withFacades();