src/Charcoal/Object/ObjectRoute.php
public function setSlug($slug)
    {
        if ($slug === null) {
            $this->slug = null;

            return $this;
        }
        if (!is_string($slug)) {
            throw new InvalidArgumentException(
                'Slug is not a string'
            );
        }
        $this->slug = $slug;

        return $this;
    }
public function setSlug($slug)
    {
        if ($slug === null) {
            $this->slug = null;

            return $this;
        }
        if (!is_string($slug)) {
            throw new InvalidArgumentException(
                'Slug is not a string'
            );
        }
        $this->slug = $slug;

        return $this;
    }
Set the object route URI.

@param  string|null $slug The route.
@throws InvalidArgumentException If the slug argument is not a string.
@return self