public function setNameAttribute(string $name)
    {
        $this->attributes['name'] = $name;
        $this->slug = $slug = str_slug($name);

        if ($this instanceof Model && self::sameSlugs($this, $slug)->exists()) {
            $similarSlugs = self::similarSlugs($this, $slug);
            $postfix = 1;
            $this->slug = $slug.$postfix;
            while ($similarSlugs->has($this->slug)) {
                $postfix++;
                $this->slug = $slug.$postfix;
            }
        }
    }