public static function make()
    {
        $class = str_replace(
            'DatabaseManager',
            ucfirst(config('database.default')).'Database',
            self::class
        );

        try {
            return new self(new $class());
        } catch (\Exception $e) {
            return new self(new MysqlDatabase());
        }
    }
public static function make()
    {
        $class = str_replace(
            'DatabaseManager',
            ucfirst(config('database.default')).'Database',
            self::class
        );

        try {
            return new self(new $class());
        } catch (\Exception $e) {
            return new self(new MysqlDatabase());
        }
    }
public static function make ( ) { $ class = str_replace ( 'DatabaseManager' , ucfirst ( config ( 'database.default' ) ) . 'Database' , self :: class ) ; try { return new self ( new $ class ( ) ) ; } catch ( \ Exception $ e ) { return new self ( new MysqlDatabase ( ) ) ; } }
New instance based on app's database driver.

@return self
New instance based on app s database driver .