protected function getDotNotatedValue($array, $attribute)
    {
        $pieces = explode('.', $attribute);
        foreach ($pieces as $piece) {
            if (!is_array($array) || !array_key_exists($piece, $array)) {
                return null;
            }
            $array = $array[$piece];
        }

        return $array;
    }