Laravel空白屏幕,修改后没有错误

My laravel site working well. But after modification i faced with a blank white screen and no logs.

If I run below command :

php -cli artisan clear-compiled

I have this error :

> Fatal error: Uncaught exception 'ReflectionException' with message
> 'Class log does not exist' in
> /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
>     Stack trace:
>     #0 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(734):
> ReflectionClass->__construct('log')
>     #1 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(629):
> Illuminate\Container\Container->build('log', Array)
>     #2 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697):
> Illuminate\Container\Container->make('log', Array)
>     #3 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(849):
> Illuminate\Foundation\Application->make('Psr\Log\LoggerI...')
>     #4 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(804):
> Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
>     #5 /data/devPhp/workspac in /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php
> on line 734

The problem is due to space in values of .env file :

wrong example :

MAIL_USERNAME = a@gmail.com
TOWN=a town

good example :

MAIL_USERNAME=a@gmail.com
TOWN='a town'

But other case could cause white blank screen such right in file and folder :

Laravel blank white screen

Laravel 5.3 blank white screen no errors

Laravel Blank white page

Make sure your namespaces are correct when referencing a class.

Probably have something like new Log(); when it should be new Acme\Log(); replacing Acme whatever your namespace is. Maybe Log() is log() by mistake.

Or try running

composer dump-autoload