public function routable()
    {
        $routable = [];

        foreach ($this->items as $path => $slug) {
            $page = $this->pages->get($path);

            if ($page !== null && $page->routable()) {
                $routable[$path] = $slug;
            }
        }

        $this->items = $routable;

        return $this;
    }
public function routable()
    {
        $routable = [];

        foreach ($this->items as $path => $slug) {
            $page = $this->pages->get($path);

            if ($page !== null && $page->routable()) {
                $routable[$path] = $slug;
            }
        }

        $this->items = $routable;

        return $this;
    }
public function routable ( ) { $ routable = [ ] ; foreach ( $ this -> items as $ path => $ slug ) { $ page = $ this -> pages -> get ( $ path ) ; if ( $ page !== null && $ page -> routable ( ) ) { $ routable [ $ path ] = $ slug ; } } $ this -> items = $ routable ; return $ this ; }
Creates new collection with only routable pages

@return Collection The collection with only routable pages
Creates new collection with only routable pages