public function computeSlug()
    {
        if ($this->is_page) {
            return $this->alias;
        }

        if (! $this->exists) {
            $category = Category::query()->findOrFail($this->category_id);
        } else {
            $category = $this->category;
        }

        return $category->slug . '/' . $this->alias;
    }
public function computeSlug()
    {
        if ($this->is_page) {
            return $this->alias;
        }

        if (! $this->exists) {
            $category = Category::query()->findOrFail($this->category_id);
        } else {
            $category = $this->category;
        }

        return $category->slug . '/' . $this->alias;
    }
public function computeSlug ( ) { if ( $ this -> is_page ) { return $ this -> alias ; } if ( ! $ this -> exists ) { $ category = Category :: query ( ) -> findOrFail ( $ this -> category_id ) ; } else { $ category = $ this -> category ; } return $ category -> slug . '/' . $ this -> alias ; }
Compute article slug.

@return string
Compute article slug .