classes/Exceptions/Handler.php
protected function handleValidation($request, BaseException $e)
    {
        if (!is_a($e, ValidationFail::class)) {
            return;
        }

        // Log validation errors so Reporter will output them
        // if (Config::get('app.debug')) Log::debug(print_r($e->validation->messages(), true));

        // Respond
        if ($request->ajax()) {
            return response()->json($e->validation->messages(), 400);
        }

        return back()->withInput()->withErrors($e->validation);
    }
protected function handleValidation($request, BaseException $e)
    {
        if (!is_a($e, ValidationFail::class)) {
            return;
        }

        // Log validation errors so Reporter will output them
        // if (Config::get('app.debug')) Log::debug(print_r($e->validation->messages(), true));

        // Respond
        if ($request->ajax()) {
            return response()->json($e->validation->messages(), 400);
        }

        return back()->withInput()->withErrors($e->validation);
    }
protected function handleValidation ( $ request , BaseException $ e ) { if ( ! is_a ( $ e , ValidationFail :: class ) ) { return ; } // Log validation errors so Reporter will output them // if (Config::get('app.debug')) Log::debug(print_r($e->validation->messages(), true)); // Respond if ( $ request -> ajax ( ) ) { return response ( ) -> json ( $ e -> validation -> messages ( ) , 400 ) ; } return back ( ) -> withInput ( ) -> withErrors ( $ e -> validation ) ; }
Redirect users to the previous page with validation errors

@param  \Illuminate\Http\Request  $request
@param  \Exception                $e
@return \Illuminate\Http\Response
Redirect users to the previous page with validation errors