PHPackages                             gtflixtv/active-record - 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. gtflixtv/active-record

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

gtflixtv/active-record
======================

Yii 2 active record

125[1 issues](https://github.com/amorpro/active-record/issues)PHP

Since Jan 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/amorpro/active-record)[ Packagist](https://packagist.org/packages/gtflixtv/active-record)[ RSS](/packages/gtflixtv-active-record/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Configuration in custom project
===============================

[](#configuration-in-custom-project)

Configure the database connection

```
\ActiveRecord\db\Bootstrap::configure($host, $base, $user, $password);
```

Usage
=====

[](#usage)

AR Generator
============

[](#ar-generator)

Create an `./bin/ar` php script with next code

```
// Ensure that the \ActiveRecord\db\Bootstrap::configure is called somewhere in bootstrap
include_once '../bootstrap.php';

$tables          = 'database_name:table1,table2';

$generator = new \ActiveGenerator\generator\ScriptHelper();
$generator->path = dirname(__DIR__) . '/src/Model';
$generator->prefix = 'Base';
$generator->generate($db->getSlavePdo(), $tables);
```

change the `$tables` variable with your list of tables.

This script will generate next structure of files:

FilesRead-OnlyExplanation`../src/Model/Base/BaseTable1.php`yesTable1 base active record class`../src/Model/Base/BaseTable1Query.php`yesTable1 query base class to retrieve the data from database`../src/Model/Base/BaseTable1Peer.php`yesTable1 base object to store field names, table name, constants related to model`../src/Model/Base/BaseTable2.php`yesTable2 base active record class`../src/Model/Base/BaseTable2Query.php`yesTable2 query base class to retrieve the data from database`../src/Model/Base/BaseTable2Peer.php`yesTable2 base object to store field names, table name, constants related to model`../src/Model/Table1.php`noTable1 active record class who can be expand for your needs`../src/Model/Table1Query.php`noTable1 query class who can be expand for your needs`../src/Model/Table2.php`noTable2 active record class who can be expand for your needs`../src/Model/Table2Query.php`noTable2 query class who can be expand for your needs

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/55e2fa112da8ed1fd871740f7b1c4df30c4149253896e5ad942ccc7efa19e0fc?d=identicon)[amorpro](/maintainers/amorpro)

---

Top Contributors

[![amorpro](https://avatars.githubusercontent.com/u/3380673?v=4)](https://github.com/amorpro "amorpro (9 commits)")

### Embed Badge

![Health badge](/badges/gtflixtv-active-record/health.svg)

```
[![Health](https://phpackages.com/badges/gtflixtv-active-record/health.svg)](https://phpackages.com/packages/gtflixtv-active-record)
```

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