protected function getExplicitKeys($attribute)
    {
        $pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/'));

        if (preg_match('/^'.$pattern.'/', $attribute, $keys)) {
            array_shift($keys);

            return $keys;
        }

        return [];
    }
protected function getExplicitKeys($attribute)
    {
        $pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/'));

        if (preg_match('/^'.$pattern.'/', $attribute, $keys)) {
            array_shift($keys);

            return $keys;
        }

        return [];
    }
protected function getExplicitKeys ( $ attribute ) { $ pattern = str_replace ( '\*' , '([^\.]+)' , preg_quote ( $ this -> getPrimaryAttribute ( $ attribute ) , '/' ) ) ; if ( preg_match ( '/^' . $ pattern . '/' , $ attribute , $ keys ) ) { array_shift ( $ keys ) ; return $ keys ; } return [ ] ; }
Get the explicit keys from an attribute flattened with dot notation.

E.g. 'foo.1.bar.spark.baz' -> [1, 'spark'] for 'foo.*.bar.*.baz'

@param  string  $attribute
@return array
Get the explicit keys from an attribute flattened with dot notation .