PHPackages                             jsnlib/joomla\_database\_eloquent - 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. jsnlib/joomla\_database\_eloquent

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

jsnlib/joomla\_database\_eloquent
=================================

輔助 Eloquent 在 Joomla! Model 中的使用

1.3.1(7y ago)055MITPHPPHP &gt;=5.4.0

Since May 11Pushed 7y agoCompare

[ Source](https://github.com/fdjkgh580/jsnlib-joomla_database_eloquent)[ Packagist](https://packagist.org/packages/jsnlib/joomla_database_eloquent)[ RSS](/packages/jsnlib-joomla-database-eloquent/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (12)Used By (0)

jsnlib-joomla\_database\_eloquent
=================================

[](#jsnlib-joomla_database_eloquent)

輔助 Eloquent 在 Joomla! Model 中的使用

安裝
--

[](#安裝)

```
composer require jsnlib/joomla_database_eloquent

```

使用方式
----

[](#使用方式)

使用別名為 Helper

```
use Jsnlib\Joomla\Database\Eloquent\Helper;
```

請務必從外部連線以後才指定給 Helper。這樣可以連線不同的資料庫

```
$builder = DB::connection('mysql');
Helper::connectionEloquent($builder);
// OR
$builder = DB::connection('mysql_custom');
Helper::connectionEloquent($builder);
```

```
Helper::proccess(true, function () use ($param)
{
    // ...
});
```

範例
--

[](#範例)

這裡示範一個連接的方式

```
require_once 'vendor/autoload.php';
use Jsnlib\Joomla\Database\Eloquent\Helper;
use Illuminate\Database\Capsule\Manager as DB;

$db = new DB;

$db->addConnection([
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'test',
    'username'  => 'root',
    'password'  => '',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
]);

$db->addConnection([
    //...
], "mysql_custom");

$db->setAsGlobal();
$db->bootEloquent();

// 連線一
$builder = DB::connection();
Helper::connectionEloquent($builder);
Helper::proccess(true, function ($builder) use ($param)
{
    //....
});

// 連線二
$builder = DB::connection('mysql_custom');
Helper::connectionEloquent($builder);
Helper::proccess(true, function ($builder) use ($param)
{
    //....
});
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~12 days

Total

11

Last Release

2803d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.2.0

1.1.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4161e8ee5212efdcdaa6a42183109f397f25c852655ec4b73cce9920cf94f2a?d=identicon)[fdjkgh580](/maintainers/fdjkgh580)

---

Top Contributors

[![fdjkgh580-2](https://avatars.githubusercontent.com/u/60056647?v=4)](https://github.com/fdjkgh580-2 "fdjkgh580-2 (14 commits)")

---

Tags

helpermodeleloquentjoomla

### Embed Badge

![Health badge](/badges/jsnlib-joomla-database-eloquent/health.svg)

```
[![Health](https://phpackages.com/badges/jsnlib-joomla-database-eloquent/health.svg)](https://phpackages.com/packages/jsnlib-joomla-database-eloquent)
```

###  Alternatives

[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k23.0M413](/packages/spatie-laravel-translatable)[sleimanx2/plastic

Plastic is an Elasticsearch ODM and mapper for Laravel. It renders the developer experience more enjoyable while using Elasticsearch by providing a fluent syntax for mapping , querying and storing eloquent models.

508141.9k1](/packages/sleimanx2-plastic)[moloquent/moloquent

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

120114.6k7](/packages/moloquent-moloquent)[elipzis/laravel-cacheable-model

Automatic query-based model cache for your Laravel app

15546.1k](/packages/elipzis-laravel-cacheable-model)[phaza/single-table-inheritance

Single Table Inheritance Trait

1515.8k](/packages/phaza-single-table-inheritance)

PHPackages © 2026

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