adnanhussainturki/laravel-cross-database-subqueries

There is no license information available for the latest version (10.0) of this package.

Eloquent cross database compatibility in subqueries

10.0 2023-10-01 14:57 UTC

This package is not auto-updated.

Last update: 2024-09-15 19:47:39 UTC


README

Build Status Codacy Badge StyleCI

Laravel Cross database subqueries

Eloquent cross database compatibility in subqueries.

Why do I need it?

To use the following Eloquent methods cross databases:

  • has
  • whereHas
  • doesntHave
  • whereDoesntHave
  • withCount (except with prefixes)

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

In your Models extends from:

  • Hoyvoy\CrossDatabase\Eloquent\Model

Supported PHP Versions

  • >=7.0

Supported Databases

  • MySQL
  • PostgreSQL
  • SQL Server

Issues & Contributing

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