|
1 |
| -[](https://travis-ci.org/hoyvoy/laravel-cross-database-subqueries) [](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) [](https://styleci.io/repos/120466504) |
2 |
| - |
3 |
| -# Laravel Cross database subqueries |
4 |
| -Eloquent cross database compatibility in subqueries. |
5 |
| - |
6 |
| -| **Laravel** | **laravel-cross-database-subqueries** | **Lifecycle** | |
7 |
| -|---|---|---| |
8 |
| -| ^5.5 | ^5.5 | January 24, 2017 | |
9 |
| -||| Bug fixes until January 2019 | |
10 |
| -||| Security fixes until June 2020 | |
11 |
| -| ^5.6 | ^5.6 | February 7, 2018 | |
12 |
| -||| 6 months of bug fixes | |
13 |
| -||| 1 year of security | |
14 |
| -| ^8.0 | ^8.0 | September 22, 2020 | |
15 |
| - |
16 |
| -# Why do I need it? |
| 1 | +# Laravel Cross Database Subqueries |
| 2 | + |
| 3 | +## Why do I need it? |
17 | 4 | ### To use the following Eloquent methods cross databases:
|
18 | 5 | * has
|
19 | 6 | * whereHas
|
20 | 7 | * doesntHave
|
21 | 8 | * whereDoesntHave
|
22 | 9 | * withCount (except with prefixes)
|
23 | 10 |
|
24 |
| -# Installation |
25 |
| -Install with composer |
26 |
| -~~~ |
27 |
| -composer require hoyvoy/laravel-cross-database-subqueries |
28 |
| -~~~ |
| 11 | +## Installation |
29 | 12 |
|
30 |
| -From Laravel 5.5 onwards, it's possible to take advantage of auto-discovery of the service provider. |
31 |
| -For Laravel versions before 5.5, you must register the service provider in your config/app.php |
| 13 | +On `composer.json` add the following: |
32 | 14 |
|
33 |
| -~~~ |
34 |
| -Hoyvoy\CrossDatabase\CrossDatabaseServiceProvider::class, |
35 |
| -~~~ |
| 15 | +```json |
| 16 | +"repositories": [ |
| 17 | + { |
| 18 | + "type": "vcs", |
| 19 | + "url": "https://github.com/Dibbyo456/laravel-cross-database-subqueries" |
| 20 | + } |
| 21 | +], |
| 22 | +"require": { |
| 23 | + "hoyvoy/laravel-cross-database-subqueries": "dev-main" |
| 24 | +}, |
| 25 | +``` |
36 | 26 |
|
37 | 27 | # Usage
|
38 |
| -In your `Models` extends from: |
39 |
| -* Hoyvoy\CrossDatabase\Eloquent\Model |
| 28 | +In your `Models` extends from: `Hoyvoy\CrossDatabase\Eloquent\Model` |
40 | 29 |
|
41 | 30 | # Supported PHP Versions
|
42 |
| -* \>=7.0 |
| 31 | +* \>=8.1 |
43 | 32 |
|
44 | 33 | # Supported Databases
|
45 | 34 | * MySQL
|
| 35 | +* MariaDB |
46 | 36 | * PostgreSQL
|
47 | 37 | * SQL Server
|
48 | 38 |
|
|
0 commit comments