src/Platform/Menu.php
public function render(string $location, string $template = 'platform::partials.mainMenu'): string
    {
        $this->checkAccess();

        return $this->findAllChildren($location)
            ->sortBy('sort')
            ->map(function ($value) use ($template) {
                return view($template, $value)->render();
            })
            ->implode(' ');
    }
public function render(string $location, string $template = 'platform::partials.mainMenu'): string
    {
        $this->checkAccess();

        return $this->findAllChildren($location)
            ->sortBy('sort')
            ->map(function ($value) use ($template) {
                return view($template, $value)->render();
            })
            ->implode(' ');
    }
public function render ( string $ location , string $ template = 'platform::partials.mainMenu' ) : string { $ this -> checkAccess ( ) ; return $ this -> findAllChildren ( $ location ) -> sortBy ( 'sort' ) -> map ( function ( $ value ) use ( $ template ) { return view ( $ template , $ value ) -> render ( ) ; } ) -> implode ( ' ' ) ; }
Generate on the menu display.

@param string $location
@param string $template

@return string
Generate on the menu display .