src/Gzero/Cms/Models/Content.php
public function createRoute(ContentTranslation $translation, bool $isActive = false)
    {
        $path = Route::buildUniquePath($this->getSlug($translation), $translation->language_code);

        $route = Route::firstOrNew(
            [
                'language_code' => $translation->language_code,
                'path'          => $path,
            ],
            ['is_active' => $isActive]
        );

        $this->routes()->save($route);

        return $this;
    }
public function createRoute(ContentTranslation $translation, bool $isActive = false)
    {
        $path = Route::buildUniquePath($this->getSlug($translation), $translation->language_code);

        $route = Route::firstOrNew(
            [
                'language_code' => $translation->language_code,
                'path'          => $path,
            ],
            ['is_active' => $isActive]
        );

        $this->routes()->save($route);

        return $this;
    }
public function createRoute ( ContentTranslation $ translation , bool $ isActive = false ) { $ path = Route :: buildUniquePath ( $ this -> getSlug ( $ translation ) , $ translation -> language_code ) ; $ route = Route :: firstOrNew ( [ 'language_code' => $ translation -> language_code , 'path' => $ path , ] , [ 'is_active' => $ isActive ] ) ; $ this -> routes ( ) -> save ( $ route ) ; return $ this ; }
Creates route with unique path based on content translation title, and tree hierarchy

@param ContentTranslation $translation Translation
@param bool               $isActive    Is active trigger

@return $this
Creates route with unique path based on content translation title and tree hierarchy