src/Menu/Providers/MenuServiceProvider.php
public function register()
    {
        $this->app->singleton('menu.builder', MenuItemBuilder::class);

        view()->composer('vain::app', function ($view) {
            // delay event trigger to the very
            // last step of menu creation
            $handler = app('menu.frontend');
            $builder = app('menu.builder');
            event(new PostMenuSetup($handler, $builder));
        });
    }
public function register()
    {
        $this->app->singleton('menu.builder', MenuItemBuilder::class);

        view()->composer('vain::app', function ($view) {
            // delay event trigger to the very
            // last step of menu creation
            $handler = app('menu.frontend');
            $builder = app('menu.builder');
            event(new PostMenuSetup($handler, $builder));
        });
    }
Register the service provider.

@return void