Authority\AuthorityL4\AuthorityL4ServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        $this->package('machuga/authority-l4');
        $this->app['authority'] = $this->app->share(function ($app) {
            $user = $app['auth']->user();
            $authority = new Authority($user);
            $fn = $app['config']->get('authority-l4::initialize', null);
            if ($fn) {
                $fn($authority);
            }
            return $authority;
        });
        $this->app->alias('authority', 'Authority\\Authority');
    }
AuthorityL4ServiceProvider