protected function registerServiceProvider($properties)
    {
        $namespace = $this->resolveNamespace($properties);

        $name = Str::studly(
            isset($properties['type']) ? $properties['type'] : 'package'
        );

        // The main service provider from a package should be named like:
        // AcmeCorp\Pages\Providers\PackageServiceProvider

        $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";

        if (! class_exists($provider)) {
            // We will try to find the alternate service provider, named like:
            // AcmeCorp\Pages\PageServiceProvider

            $name = Str::singular(
                $properties['basename']
            );

            if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                return;
            }
        }

        $this->app->register($provider);
    }
protected function registerServiceProvider($properties)
    {
        $namespace = $this->resolveNamespace($properties);

        $name = Str::studly(
            isset($properties['type']) ? $properties['type'] : 'package'
        );

        // The main service provider from a package should be named like:
        // AcmeCorp\Pages\Providers\PackageServiceProvider

        $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";

        if (! class_exists($provider)) {
            // We will try to find the alternate service provider, named like:
            // AcmeCorp\Pages\PageServiceProvider

            $name = Str::singular(
                $properties['basename']
            );

            if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                return;
            }
        }

        $this->app->register($provider);
    }
protected function registerServiceProvider ( $ properties ) { $ namespace = $ this -> resolveNamespace ( $ properties ) ; $ name = Str :: studly ( isset ( $ properties [ 'type' ] ) ? $ properties [ 'type' ] : 'package' ) ; // The main service provider from a package should be named like: // AcmeCorp\Pages\Providers\PackageServiceProvider $ provider = "{$namespace}\\Providers\\{$name}ServiceProvider" ; if ( ! class_exists ( $ provider ) ) { // We will try to find the alternate service provider, named like: // AcmeCorp\Pages\PageServiceProvider $ name = Str :: singular ( $ properties [ 'basename' ] ) ; if ( ! class_exists ( $ provider = "{$namespace}\\{$name}ServiceProvider" ) ) { return ; } } $ this -> app -> register ( $ provider ) ; }
Register the Package Service Provider.

@param array $properties

@return void

@throws \Nova\Packages\FileMissingException
Register the Package Service Provider .