private function createUniqueNumericSlug($slug)
    {
        if ($this->isNumericSlug($slug)) {
            // Extract last number and increment it
            $number = substr($slug, -1, 1);
            $number++;

            // Replace with new number
            $string = substr($slug, 0, strlen($slug) - 1) . $number;

            return $string;
        } else {
            return $slug;
        }
    }
private function createUniqueNumericSlug($slug)
    {
        if ($this->isNumericSlug($slug)) {
            // Extract last number and increment it
            $number = substr($slug, -1, 1);
            $number++;

            // Replace with new number
            $string = substr($slug, 0, strlen($slug) - 1) . $number;

            return $string;
        } else {
            return $slug;
        }
    }
private function createUniqueNumericSlug ( $ slug ) { if ( $ this -> isNumericSlug ( $ slug ) ) { // Extract last number and increment it $ number = substr ( $ slug , - 1 , 1 ) ; $ number ++ ; // Replace with new number $ string = substr ( $ slug , 0 , strlen ( $ slug ) - 1 ) . $ number ; return $ string ; } else { return $ slug ; } }
Creates unique slug

@param string $slug
@return string
Creates unique slug