PHPackages                             transisi-org/laravel-cross-database-subqueries - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. transisi-org/laravel-cross-database-subqueries

ActiveLibrary[Database &amp; ORM](/categories/database)

transisi-org/laravel-cross-database-subqueries
==============================================

Eloquent cross database compatibility in subqueries

00PHP

Since Nov 21Pushed 5mo agoCompare

[ Source](https://github.com/transisi-org/laravel-cross-database-subqueries)[ Packagist](https://packagist.org/packages/transisi-org/laravel-cross-database-subqueries)[ RSS](/packages/transisi-org-laravel-cross-database-subqueries/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/5efc820825937b7b5a07fd4d3d5ec3b55a7e30cd3f962f68a42b53310b418b87/68747470733a2f2f7472617669732d63692e6f72672f686f79766f792f6c61726176656c2d63726f73732d64617461626173652d737562717565726965732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hoyvoy/laravel-cross-database-subqueries) [![Codacy Badge](https://camo.githubusercontent.com/e92d1dac0ace161f1b199b6f923e1b006c9685120788ffb98e9ed61ce773b087/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3565663135326564663133643434343061396363616366393432626265636639)](https://www.codacy.com/app/mario-hoyvoy/laravel-cross-database-subqueries?utm_source=github.com&utm_medium=referral&utm_content=hoyvoy/laravel-cross-database-subqueries&utm_campaign=Badge_Grade) [![StyleCI](https://camo.githubusercontent.com/bb691ff810e2c5bae3f5efc40ec855134a3adee6bc7cded857a0c3cdd0454e7e/68747470733a2f2f7374796c6563692e696f2f7265706f732f3132303436363530342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/120466504)

Laravel Cross database subqueries
=================================

[](#laravel-cross-database-subqueries)

Eloquent cross database compatibility in subqueries.

Why do I need it?
=================

[](#why-do-i-need-it)

### To use the following Eloquent methods cross databases:

[](#to-use-the-following-eloquent-methods-cross-databases)

- has
- whereHas
- doesntHave
- whereDoesntHave
- withCount

Installation
============

[](#installation)

Install with composer

```
composer require hoyvoy/laravel-cross-database-subqueries

```

From Laravel 5.5 onwards, it's possible to take advantage of auto-discovery of the service provider. For Laravel versions before 5.5, you must register the service provider in your config/app.php

```
Hoyvoy\CrossDatabase\CrossDatabaseServiceProvider::class,

```

Usage
=====

[](#usage)

In your `Models` extends from:

- Hoyvoy\\CrossDatabase\\Eloquent\\Model

Supported PHP Versions
======================

[](#supported-php-versions)

- &gt;=7.0

Supported Databases
===================

[](#supported-databases)

- MySQL
- PostgreSQL
- SQL Server

Issues &amp; Contributing
=========================

[](#issues--contributing)

If you find an issue please report it or contribute by submitting a pull request.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance48

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d53d9c418534519985e1ec8e10bc25eeabd7081a561dafffd27f853824aa03d?d=identicon)[transisidev](/maintainers/transisidev)

---

Top Contributors

[![maguilar92](https://avatars.githubusercontent.com/u/25102127?v=4)](https://github.com/maguilar92 "maguilar92 (17 commits)")[![transisidev](https://avatars.githubusercontent.com/u/153573883?v=4)](https://github.com/transisidev "transisidev (1 commits)")

### Embed Badge

![Health badge](/badges/transisi-org-laravel-cross-database-subqueries/health.svg)

```
[![Health](https://phpackages.com/badges/transisi-org-laravel-cross-database-subqueries/health.svg)](https://phpackages.com/packages/transisi-org-laravel-cross-database-subqueries)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
