PHPackages                             mage/db2 - 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. mage/db2

ActiveMagento2-module[Database &amp; ORM](/categories/database)

mage/db2
========

Magento 2 module to load Laravel Eloquent with Magento

1.0.8(1y ago)111012PHP

Since Nov 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Genaker/mage-db2)[ Packagist](https://packagist.org/packages/mage/db2)[ RSS](/packages/mage-db2/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (5)Versions (6)Used By (2)

install
=======

[](#install)

```
composer require mage/db2

```

If you have any conflicts, you can use:

```
composer require mage/db2 --with-all-dependencies --ignore-platform-reqs --prefer-source --no-scripts

```

use Mage\\DB2\\DB2;

$isReturningCustomer = DB2::table('sales\_order') -&gt;where('customer\_id', $customerId) -&gt;where('entity\_id', '&lt;', $entityId) -&gt;exists();

```

```

DB2::table('sales\_order')-&gt;where('customer\_id', 123)-&gt;get();

```

Query product images with product details using DB2:

```

```
        $images = DB2::table('catalog_product_entity_media_gallery as main_table')
            ->join(
                'catalog_product_entity_media_gallery_value as mgv',
                'mgv.value_id',
                '=',
                'main_table.value_id'
            )
            ->join(
                'catalog_product_entity as e',
                'e.entity_id',
                '=',
                'mgv.entity_id'
            )
            ->select([
                'main_table.value_id',
                'main_table.attribute_id',
                'main_table.value',
                'main_table.media_type',
                'main_table.disabled',
                'e.sku'
            ])
            ->where('main_table.media_type', '=', 'image')
            ->where('main_table.disabled', '=', 0)
            ->orderBy('main_table.value_id', 'ASC')
            ->get();

```

```

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance40

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.5% 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.

###  Release Activity

Cadence

Every ~5 days

Total

5

Last Release

559d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9213670?v=4)[Yegor Shytikov](/maintainers/genaker)[@Genaker](https://github.com/Genaker)

---

Top Contributors

[![wseng](https://avatars.githubusercontent.com/u/6572161?v=4)](https://github.com/wseng "wseng (6 commits)")[![Genaker](https://avatars.githubusercontent.com/u/9213670?v=4)](https://github.com/Genaker "Genaker (5 commits)")

### Embed Badge

![Health badge](/badges/mage-db2/health.svg)

```
[![Health](https://phpackages.com/badges/mage-db2/health.svg)](https://phpackages.com/packages/mage-db2)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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