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

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

adecoder/eloquent
=================

PDO Connection and MySQL Queries in PHP

1.0(4y ago)26MITPHPPHP &gt;=8.0

Since Feb 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/md-aamroni/eloquent)[ Packagist](https://packagist.org/packages/adecoder/eloquent)[ RSS](/packages/adecoder-eloquent/feed)WikiDiscussions master Synced 1mo ago

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

 [ ![](https://user-images.githubusercontent.com/61397934/151708131-1373e724-9264-4a52-b2f4-022f3d948357.png) ](https://adecoder.com)

PDO Connection and MySQL Queries in PHP
---------------------------------------

[](#pdo-connection-and-mysql-queries-in-php)

[![workflow](https://github.com/md-aamroni/eloquent/actions/workflows/application.yml/badge.svg)](https://github.com/md-aamroni/eloquent/actions/workflows/application.yml/badge.svg)[![Copyright](https://camo.githubusercontent.com/3ce4ed8cd7835b10bc83026b6c4753dc4eacdec056701f2a2738f57751b98e55/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f707972696768742d614465636f6465722d627269676874677265656e2e737667)](https://camo.githubusercontent.com/3ce4ed8cd7835b10bc83026b6c4753dc4eacdec056701f2a2738f57751b98e55/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f707972696768742d614465636f6465722d627269676874677265656e2e737667)[![License](https://camo.githubusercontent.com/1a2e0606685ce00663bf829868f794fd3fc9c86f8d80cae324734129e0723a58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e737667)](./LICENSE)[![Developed](https://camo.githubusercontent.com/8005eb3ccebe44912eeef4b6485960281cd97f18bc31204ef889007f0e007b17/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d382e302d627269676874677265656e2e737667)](https://camo.githubusercontent.com/8005eb3ccebe44912eeef4b6485960281cd97f18bc31204ef889007f0e007b17/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d382e302d627269676874677265656e2e737667)[![Copyright](https://camo.githubusercontent.com/9d690c14b1cf187389471bd968ca962ab773388e4e376eb44c1763625a37fd72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446576656c6f7065722d6d642e61616d726f6e692d627269676874677265656e2e737667)](https://camo.githubusercontent.com/9d690c14b1cf187389471bd968ca962ab773388e4e376eb44c1763625a37fd72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446576656c6f7065722d6d642e61616d726f6e692d627269676874677265656e2e737667)

### Installation

[](#installation)

```
composer require adecoder/eloquent
```

### [Environment File](env-example)

[](#environment-file)

```
DB_APP_HOST=localhost
DB_APP_PORT=3308
DB_APP_NAME=xtra_guideasy_app_rdb
DB_APP_CHAR=utf8mb4
DB_APP_USER=root
DB_APP_PASS=
```

### Select Statement

[](#select-statement)

```
use Adecoder\Eloquent\Eloquent;

$query = "SELECT * FROM table_name WHERE id = :B_SEARCH;";
$param = array(':B_SEARCH' => 2);

$select = Eloquent::select(query: $query, param: $param, itself: false)->get();
dd($select);
```

### Create Statement

[](#create-statement)

```
use Adecoder\Eloquent\Eloquent;

$query = "INSERT INTO table_name (username, email_id) VALUE(:B_USER, :B_MAIL)";
$param = array(':B_USER' => 'md.aarmoni', ':B_MAIL' => 'md.aamroni@gmail.com');

$create = Eloquent::create(query: $query, param: $param, array: false)->get();
dd($create);
```

### Delete Statement

[](#delete-statement)

```
use Adecoder\Eloquent\Eloquent;

$query = "DELETE FROM table_name WHERE id = :B_DELETE;";
$param = array(':B_DELETE' => 14);

$delete = Eloquent::delete(query: $query, param: $param, array: false)->get();
dd($delete);
```

### Update Statement

[](#update-statement)

```
use Adecoder\Eloquent\Eloquent;

$query = "UPDATE table_name SET username = :B_USER, email_id = :B_MAIL WHERE id = :B_UPDATE;";
$param = array(':B_USER' => 'md-aarmoni', ':B_MAIL' => 'aamroni@gmail.com', ':B_UPDATE' => 14);
$update = Eloquent::update(query: $query, param: $param, array: false)->get();
dd($update);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

1565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/802858044d5e6fc5a4a61dc3a1bf663bb23a8ee310750bc4bcba0494fc232ae5?d=identicon)[md-aamroni](/maintainers/md-aamroni)

---

Top Contributors

[![md-aamroni](https://avatars.githubusercontent.com/u/61397934?v=4)](https://github.com/md-aamroni "md-aamroni (1 commits)")

---

Tags

db-connectioneloquentmysql-databasepdo-mysqlquery-builder

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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