src/Chronos/Content/app/Models/Content.php
public function getPathAttribute()
    {
        // add type
        $path = $this->type->path;

        // add parents
        $crumbs = $this->crumbs;
        $crumbs_path = '';
        while ($crumbs) {
            $crumbs_path = '/' . $crumbs->slug . $crumbs_path;
            $crumbs = $crumbs->crumbs;
        }
        $path .= $crumbs_path;

        // add slug
        $path .= '/' . $this->slug;

        return $path;
    }
public function getPathAttribute()
    {
        // add type
        $path = $this->type->path;

        // add parents
        $crumbs = $this->crumbs;
        $crumbs_path = '';
        while ($crumbs) {
            $crumbs_path = '/' . $crumbs->slug . $crumbs_path;
            $crumbs = $crumbs->crumbs;
        }
        $path .= $crumbs_path;

        // add slug
        $path .= '/' . $this->slug;

        return $path;
    }
public function getPathAttribute ( ) { // add type $ path = $ this -> type -> path ; // add parents $ crumbs = $ this -> crumbs ; $ crumbs_path = '' ; while ( $ crumbs ) { $ crumbs_path = '/' . $ crumbs -> slug . $ crumbs_path ; $ crumbs = $ crumbs -> crumbs ; } $ path .= $ crumbs_path ; // add slug $ path .= '/' . $ this -> slug ; return $ path ; }
Get path for item.
Get path for item .