PHPackages                             therakib7/wp-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. therakib7/wp-eloquent

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

therakib7/wp-eloquent
=====================

Eloquent ORM for wordpress.

1.0.0(10mo ago)1154MITPHPPHP ^7.4|^8.0

Since Jul 6Pushed 9mo agoCompare

[ Source](https://github.com/therakib7/wp-eloquent)[ Packagist](https://packagist.org/packages/therakib7/wp-eloquent)[ Docs](https://github.com/softtent/wp-eloquent)[ RSS](/packages/therakib7-wp-eloquent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

SoftTent WpEloquent
===================

[](#softtent-wpeloquent)

> This package extract from laravel 8.9

The WpEloquent component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite.

Installing
----------

[](#installing)

```
composer require softtent/wp-eloquent
```

Usage Instructions
------------------

[](#usage-instructions)

First, boot Application with a connection.

**Use $wpdb connection**

```
use SoftTent\WpEloquent\Application;

Application::bootWp();
```

**Use separated connection**

```
use SoftTent\WpEloquent\Application;

Application::boot([
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'database',
    'username'  => 'root',
    'password'  => 'password',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
]);
```

Once the Application booted. You may use it like so:

**Using The Query Builder**

```
use SoftTent\WpEloquent\Support\Facades\DB;
$users = DB::table('users')->where('votes', '>', 100)->get();
```

Other core methods may be accessed directly from the Capsule in the same manner as from the DB facade:

```
use SoftTent\WpEloquent\Support\Facades\DB;
$results = DB::select('select * from users where id = ?', [1]);
```

**Using The Schema Builder**

```
use SoftTent\WpEloquent\Support\Facades\Schema;
Schema::create('users', function ($table) {
    $table->increments('id');
    $table->string('email')->unique();
    $table->timestamps();
});
```

**Using The Eloquent ORM**

```
class User extends SoftTent\WpEloquent\Database\Eloquent\Model {}

$users = User::where('votes', '>', 1)->get();
```

For further documentation on using the various database facilities this library provides, consult the [Laravel framework documentation](https://laravel.com/docs/8.x/eloquent).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance55

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

309d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10976513?v=4)[Rakibul Hasan](/maintainers/therakib7)[@therakib7](https://github.com/therakib7)

---

Top Contributors

[![therakib7](https://avatars.githubusercontent.com/u/10976513?v=4)](https://github.com/therakib7 "therakib7 (2 commits)")

---

Tags

laravelwordpressdatabaseormsqlwp-eloquentsofttent

### Embed Badge

![Health badge](/badges/therakib7-wp-eloquent/health.svg)

```
[![Health](https://phpackages.com/badges/therakib7-wp-eloquent/health.svg)](https://phpackages.com/packages/therakib7-wp-eloquent)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[as247/wp-eloquent

Eloquent ORM for wordpress.

4524.1k1](/packages/as247-wp-eloquent)[dbout/wp-orm

WordPress ORM with Eloquent.

1279.6k1](/packages/dbout-wp-orm)[bigsinoos/j-eloquent

Convert eloquent date attributes to jalali (Persian) dates on the fly. (supports model propery access, toJson, toString and toArray).

224.7k](/packages/bigsinoos-j-eloquent)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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