PHPackages                             indgy/phluent - 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. indgy/phluent

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

indgy/phluent
=============

A dependency free lightweight fluent SQL query builder using PDO

0.9.2(5y ago)116MITPHPPHP ^7.3||^8.0

Since Feb 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/indgy/phluent)[ Packagist](https://packagist.org/packages/indgy/phluent)[ RSS](/packages/indgy-phluent/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Phluent
=======

[](#phluent)

[![Build Status](https://camo.githubusercontent.com/3154c81ed7c9e1cabe30590d401dc18230ad07c53efcc4884826068e384c7dec/68747470733a2f2f7472617669732d63692e6f72672f696e6467792f70686c75656e742e7376673f6272616e63683d6d61696e)](https://travis-ci.org/indgy/phluent)[![Coverage Status](https://camo.githubusercontent.com/37199158e28f4679da6df06e414609bfc3019a8029d5e85ebd8dc25d67df5a84/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f696e6467792f70686c75656e742f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/indgy/phluent?branch=main)

A dependency free lightweight fluent SQL query builder using PDO similar to Eloquent, allows you to query your database fluently:

```
$query->select('title, year')
    ->from('movies')
    ->where(function($query) {
        $query->where('title', 'like' ,'A %');
        $query->orWhere('title', 'like' ,'The %');
    })
    ->orderBy('year');
```

Install
-------

[](#install)

Phluent can be used as a composer package or a single file download and included() into your project.

**Via Composer**

```
$ composer require indgy/phluent
```

**As a standalone file**

```
cp dist/Phluent.php /path/to/your/project
```

Then require it where needed in your project

```
require("/path/to/your/project/Phluent.php");
```

Usage
-----

[](#usage)

See the [documentation](https://indgy.github.io/phluent) for details.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Indgy](https://indgy.uk)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

3

Last Release

1906d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/65541311?v=4)[indgy](/maintainers/indgy)[@indgy](https://github.com/indgy)

---

Top Contributors

[![indgy](https://avatars.githubusercontent.com/u/65541311?v=4)](https://github.com/indgy "indgy (35 commits)")

### Embed Badge

![Health badge](/badges/indgy-phluent/health.svg)

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

###  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)
