protected function extractDistinctValues($attribute)
    {
        $attributeData = ValidationData::extractDataFromPath(
            ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
        );

        $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#'));

        return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
            return (bool) preg_match('#^'.$pattern.'\z#u', $key);
        });
    }
protected function extractDistinctValues($attribute)
    {
        $attributeData = ValidationData::extractDataFromPath(
            ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
        );

        $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#'));

        return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
            return (bool) preg_match('#^'.$pattern.'\z#u', $key);
        });
    }
protected function extractDistinctValues ( $ attribute ) { $ attributeData = ValidationData :: extractDataFromPath ( ValidationData :: getLeadingExplicitAttributePath ( $ attribute ) , $ this -> data ) ; $ pattern = str_replace ( '\*' , '[^.]+' , preg_quote ( $ attribute , '#' ) ) ; return Arr :: where ( Arr :: dot ( $ attributeData ) , function ( $ value , $ key ) use ( $ pattern ) { return ( bool ) preg_match ( '#^' . $ pattern . '\z#u' , $ key ) ; } ) ; }
Extract the distinct values from the data.

@param  string  $attribute
@return array
Extract the distinct values from the data .