Overtrue\Validation\Validator::getDisplayableValue PHP Method

getDisplayableValue() public method

Get the displayable name of the value.
public getDisplayableValue ( string $attribute, mixed $value ) : string
$attribute string
$value mixed
return string
    public function getDisplayableValue($attribute, $value)
    {
        if (isset($this->customValues[$attribute][$value])) {
            return $this->customValues[$attribute][$value];
        }
        $key = "validation.values.{$attribute}.{$value}";
        if (($line = $this->translator->trans($key)) !== $key) {
            return $line;
        } else {
            return $value;
        }
    }
Validator