public function scopeEmbed($query, $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);

        // Extract the relations from the list of attributes.
        $relations = array_filter(array_diff($attributes, array_keys($embedable)));

        // If the accessors require any relation, add them to the list.
        foreach ($accessors as $accessor)
        {
            // Performance check.
            if (empty($embedable[$accessor])) {
                continue;
            }

            $relations = array_merge($relations, $embedable[$accessor]);
        }

        // Remove duplicates.
        $relations = array_unique($relations);

        // TODO: Temporarily set "appends" array to embedable accessors.

        return $query->with($relations);
    }