original_string: public function getValidationMessage($attribute, $rule, $data = [], $type = null)
      {
          $path = Str::snake($rule);
          if ($type !== null) {
              $path .= '.' . $type;
          }
  
          if ($this->translator->has('validation.custom.' . $attribute . '.' . $path)) {
              $path = 'custom.' . $attribute . '.' . $path;
          }
  
          $niceName = $this->getValidationAttribute($attribute);
  
          return $this->translator->get('validation.' . $path, $data + ['attribute' => $niceName]);
      }
code: public function getValidationMessage($attribute, $rule, $data = [], $type = null)
      {
          $path = Str::snake($rule);
          if ($type !== null) {
              $path .= '.' . $type;
          }
  
          if ($this->translator->has('validation.custom.' . $attribute . '.' . $path)) {
              $path = 'custom.' . $attribute . '.' . $path;
          }
  
          $niceName = $this->getValidationAttribute($attribute);
  
          return $this->translator->get('validation.' . $path, $data + ['attribute' => $niceName]);
      }
code_tokens: public function getValidationMessage ( $ attribute , $ rule , $ data = [ ] , $ type = null ) { $ path = Str :: snake ( $ rule ) ; if ( $ type !== null ) { $ path .= '.' . $ type ; } if ( $ this -> translator -> has ( 'validation.custom.' . $ attribute . '.' . $ path ) ) { $ path = 'custom.' . $ attribute . '.' . $ path ; } $ niceName = $ this -> getValidationAttribute ( $ attribute ) ; return $ this -> translator -> get ( 'validation.' . $ path , $ data + [ 'attribute' => $ niceName ] ) ; }
docstring: Get user friendly validation message.
  
  @param string $attribute
  @param string $rule
  @param array $data
  @param string $type
  @return string
  @see Illuminate\Validation\Validator::getMessage()
docstring_tokens: Get user friendly validation message .