public function registerMenuFactory()
    {
        $this->app->singleton('menu.factory', function ($app) {
            return new MenuFactory($app['menus.collection'], $app);
        });

        $this->app->alias('menu.factory', MenuFactory::class);
    }
public function registerMenuFactory()
    {
        $this->app->singleton('menu.factory', function ($app) {
            return new MenuFactory($app['menus.collection'], $app);
        });

        $this->app->alias('menu.factory', MenuFactory::class);
    }
public function registerMenuFactory ( ) { $ this -> app -> singleton ( 'menu.factory' , function ( $ app ) { return new MenuFactory ( $ app [ 'menus.collection' ] , $ app ) ; } ) ; $ this -> app -> alias ( 'menu.factory' , MenuFactory :: class ) ; }
Register factory of menus.

@return void
Register factory of menus .