protected function handleErrorResponse(Response $response)
    {
        $exception = $response->exception;

        $error = new MessageBag([
            'type'    => get_class($exception),
            'message' => $exception->getMessage(),
            'file'    => $exception->getFile(),
            'line'    => $exception->getLine(),
        ]);

        return back()->withInput()->withErrors($error, 'exception');
    }
protected function handleErrorResponse(Response $response)
    {
        $exception = $response->exception;

        $error = new MessageBag([
            'type'    => get_class($exception),
            'message' => $exception->getMessage(),
            'file'    => $exception->getFile(),
            'line'    => $exception->getLine(),
        ]);

        return back()->withInput()->withErrors($error, 'exception');
    }
protected function handleErrorResponse ( Response $ response ) { $ exception = $ response -> exception ; $ error = new MessageBag ( [ 'type' => get_class ( $ exception ) , 'message' => $ exception -> getMessage ( ) , 'file' => $ exception -> getFile ( ) , 'line' => $ exception -> getLine ( ) , ] ) ; return back ( ) -> withInput ( ) -> withErrors ( $ error , 'exception' ) ; }
Handle Response with exceptions.

@param Response $response

@return \Illuminate\Http\RedirectResponse
Handle Response with exceptions .