public function setFullBaseUrl(array $menu = []): array
    {
        $menu = array_map(
            function ($v) {
                $url = Hash::get($v, 'url');
                $children = Hash::get($v, 'children');
                if ($url) {
                    $v['url'] = Router::url($url, true);
                }
                if (is_array($children)) {
                    $v['children'] = $this->setFullBaseUrl($children);
                }

                return $v;
            },
            $menu
        );

        return $menu;
    }
public function setFullBaseUrl(array $menu = []): array
    {
        $menu = array_map(
            function ($v) {
                $url = Hash::get($v, 'url');
                $children = Hash::get($v, 'children');
                if ($url) {
                    $v['url'] = Router::url($url, true);
                }
                if (is_array($children)) {
                    $v['children'] = $this->setFullBaseUrl($children);
                }

                return $v;
            },
            $menu
        );

        return $menu;
    }
public function setFullBaseUrl ( array $ menu = [ ] ) : array { $ menu = array_map ( function ( $ v ) { $ url = Hash :: get ( $ v , 'url' ) ; $ children = Hash :: get ( $ v , 'children' ) ; if ( $ url ) { $ v [ 'url' ] = Router :: url ( $ url , true ) ; } if ( is_array ( $ children ) ) { $ v [ 'children' ] = $ this -> setFullBaseUrl ( $ children ) ; } return $ v ; } , $ menu ) ; return $ menu ; }
Set the full base URL recursivelly for all the menu and their children.

@param mixed[] $menu Given menu
@return mixed[] $menus
Set the full base URL recursivelly for all the menu and their children .