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()); } }