src/ServiceProvider.php
/**
     * Register any package services.
     *
     * @return void
     */
Register any package services.
@return void
Register any package services . @return void
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/../config/user.php', 'user');
        $this->app->singleton('user-manager', function () {
            return new Manager(
                config('user.group_types'),
                config('user.group_max_depth')
            );
        });
        $this->app->booting(function () {
            AliasLoader::getInstance()->alias('UserManager', Facade::class);
        });
    }
public function register ( ) { $ this -> mergeConfigFrom ( __DIR__ . '/../config/user.php' , 'user' ) ; $ this -> app -> singleton ( 'user-manager' , function ( ) { return new Manager ( config ( 'user.group_types' ) , config ( 'user.group_max_depth' ) ) ; } ) ; $ this -> app -> booting ( function ( ) { AliasLoader :: getInstance ( ) -> alias ( 'UserManager' , Facade :: class ) ; } ) ; }
Register any package services.
Register any package services .
// add AccessControl alias