public function applyEmbedableAttributes($embed)
    {
        // Relations and accessors to append.
        $separator = isset($this->embedSeparator) ? $this->embedSeparator : ',';
        $attributes = is_string($embed) ? @explode($separator, $embed) : (array) $embed;

        // Extract the accessors from the list of attributes.
        $embedable = isset($this->embedable) ? $this->embedable : [];
        $accessors = array_intersect(array_keys($embedable), $attributes);

        // Append extra attributes.
        if (count($accessors))
        {
            foreach ($accessors as $accessor)
            {
                $this->setAttribute($accessor, $this->getAttributeValue($accessor));
            }
        }
    }