src/Packages.php
public static function provider($package)
    {
        $location = __DIR__.'/../../'.$package.'/src';

        $files = is_dir($location) ? scandir($location) : [];

        foreach ($files as $file) {
            if (strpos($file, 'ServiceProvider') !== false) {
                return str_replace('.php', '', $file);
            }
        }

        return false;
    }
public static function provider($package)
    {
        $location = __DIR__.'/../../'.$package.'/src';

        $files = is_dir($location) ? scandir($location) : [];

        foreach ($files as $file) {
            if (strpos($file, 'ServiceProvider') !== false) {
                return str_replace('.php', '', $file);
            }
        }

        return false;
    }
public static function provider ( $ package ) { $ location = __DIR__ . '/../../' . $ package . '/src' ; $ files = is_dir ( $ location ) ? scandir ( $ location ) : [ ] ; foreach ( $ files as $ file ) { if ( strpos ( $ file , 'ServiceProvider' ) !== false ) { return str_replace ( '.php' , '' , $ file ) ; } } return false ; }
Returns the package service provider if exists.

@param string $package
Returns the package service provider if exists .