Disable laravel error handler

前端 未结 7 798
野的像风
野的像风 2020-12-01 04:40

Is there anyway to disable the laravel error handler all together?

I want to simply display standard PHP errors, not the Who

7条回答
  •  抹茶落季
    2020-12-01 05:09

    Exception handling is hardcoded into the Application class. You can override the classes in your bootstrap/start.php file:

    class ExceptionHandler {
        public function handleException($exception) {
            throw $exception;
        }
        public function handleConsole($exception) {
            throw $exception;
        }
    }
    
    class MyApplication extends Illuminate\Foundation\Application
    {
        public function registerExceptionProvider() {}
        public function startExceptionHandling() {}
    }
    
    $app = new MyApplication;
    

    It should go without saying that this is definitely not encouraged.

提交回复
热议问题