protected function fixSlug($slug)
    {
        $parts = explode('/', $slug);
        $slug = '';
        foreach ($parts as $part) {
            if ($part) {
                $slug .= '/'.str_slug($part);
            }
        }

        return strtolower('/'.ltrim($slug, '/'));
    }
protected function fixSlug($slug)
    {
        $parts = explode('/', $slug);
        $slug = '';
        foreach ($parts as $part) {
            if ($part) {
                $slug .= '/'.str_slug($part);
            }
        }

        return strtolower('/'.ltrim($slug, '/'));
    }
protected function fixSlug ( $ slug ) { $ parts = explode ( '/' , $ slug ) ; $ slug = '' ; foreach ( $ parts as $ part ) { if ( $ part ) { $ slug .= '/' . str_slug ( $ part ) ; } } return strtolower ( '/' . ltrim ( $ slug , '/' ) ) ; }
Fixes slashes used in slug.

@param $slug

@return string
Fixes slashes used in slug .