src/Charcoal/Object/ObjectRoute.php
public function generateUniqueSlug()
    {
        if (!$this->isSlugUnique()) {
            if (!$this->originalSlug) {
                $this->originalSlug = $this->slug();
            }
            $this->slugInc++;
            $this->setSlug($this->originalSlug.'-'.$this->slugInc);

            return $this->generateUniqueSlug();
        }

        return $this;
    }
public function generateUniqueSlug()
    {
        if (!$this->isSlugUnique()) {
            if (!$this->originalSlug) {
                $this->originalSlug = $this->slug();
            }
            $this->slugInc++;
            $this->setSlug($this->originalSlug.'-'.$this->slugInc);

            return $this->generateUniqueSlug();
        }

        return $this;
    }
Generate a unique URL slug for routable object.

@return self