original_string: protected function failureResponse($error = null)
      {
          if (request()->ajax()) {
              return response()->json([
                  'success' => false,
                  'error'   => $error,
              ]);
          }
  
          return redirect()->back()->withErrors([
              'general' => $error,
          ]);
      }
code: protected function failureResponse($error = null)
      {
          if (request()->ajax()) {
              return response()->json([
                  'success' => false,
                  'error'   => $error,
              ]);
          }
  
          return redirect()->back()->withErrors([
              'general' => $error,
          ]);
      }
code_tokens: protected function failureResponse ( $ error = null ) { if ( request ( ) -> ajax ( ) ) { return response ( ) -> json ( [ 'success' => false , 'error' => $ error , ] ) ; } return redirect ( ) -> back ( ) -> withErrors ( [ 'general' => $ error , ] ) ; }
docstring: Returns standard failure response.
  
  @param string|null $error
  @return mixed
docstring_tokens: Returns standard failure response .