src/Repositories/EloquentMenu.php
public function prepare($items = null)
    {
        $items->each(function ($item) {
            $item->items = collect();
            if ($item->has_categories) {
                $item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
            }
            $item->href = $this->setHref($item);
            $item->class = $this->setClass($item);
        });

        return $items;
    }
public function prepare($items = null)
    {
        $items->each(function ($item) {
            $item->items = collect();
            if ($item->has_categories) {
                $item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
            }
            $item->href = $this->setHref($item);
            $item->class = $this->setClass($item);
        });

        return $items;
    }
public function prepare ( $ items = null ) { $ items -> each ( function ( $ item ) { $ item -> items = collect ( ) ; if ( $ item -> has_categories ) { $ item -> items = $ this -> prepare ( ProjectCategories :: allForMenu ( $ item -> page -> uri ( ) ) ) ; } $ item -> href = $ this -> setHref ( $ item ) ; $ item -> class = $ this -> setClass ( $ item ) ; } ) ; return $ items ; }
Set href and classes for each items in collection.

@param $items

@return \TypiCMS\NestableCollection
Set href and classes for each items in collection .