jocoonopa / laravel-cross-database-subqueries
Eloquent cross database compatibility in subqueries
Installs: 3 061
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 45
Language:HTML
Requires
- php: ^8.0
- illuminate/container: ^5.6 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
- illuminate/database: ^5.6 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
- illuminate/events: ^5.6 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
- illuminate/support: ^5.6 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
Requires (Dev)
- codacy/coverage: dev-master
- orchestra/testbench: ^8.15
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-11-05 11:32:26 UTC
README
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.