PHPackages                             titon/model - 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. titon/model

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

titon/model
===========

The Titon model package provides an active record style approach to database CRUD functionality.

0.3.2(12y ago)34531BSD-2PHPPHP &gt;=5.4.0

Since Jan 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/titon/model)[ Packagist](https://packagist.org/packages/titon/model)[ Docs](http://titon.io)[ RSS](/packages/titon-model/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (6)Used By (1)

Model v0.3.2 [![Build Status](https://camo.githubusercontent.com/0be2e641f09502b052190b70f98cd2448354bd0518c9c38616abfdcbdf1f13ed/68747470733a2f2f7472617669732d63692e6f72672f7469746f6e2f6d6f64656c2e706e67)](https://travis-ci.org/titon/model)
=================================================================================================================================================================================================================================================

[](#model-v032-)

The Titon model package provides an [active record](http://en.wikipedia.org/wiki/Active_record_pattern) style approach to database CRUD functionality. Further provides data validation, field protection, and table relationship support.

```
$user = User::find(1);
$user->username = 'foobar';
$user->save();
```

Outside of the active record structure, a handful of static methods can be used for basic database functionality, like inserting, deleting, selecting, and updating.

```
User::insert(['username' => 'foobar']);
User::select()->all();
User::deleteBy(1);
User::updateBy(1, ['username' => 'foobar']);
```

A full list of database features can be found under the [DB package](https://github.com/titon/db).

Alongside the DBAL is an extensible object relational mapper (ORM) that permits repositories (database tables) to relate records to other repository records through foreign keys. Related data can also be saved automatically while saving parent records, and can be pulled in automatically and easily through the query builder. The ORM is fully compatible with schemaless/NoSQL database drivers.

```
$users->hasOne('Profile', 'App\Repository\Profile', 'profile_id');

$entity = $users->select()->with('Profile')->where('id', 1)->first();
```

### Features

[](#features)

- `Model` - Active record model
    - Relationships
    - Validation
    - Data filling
    - Data guarding
    - Accessors
    - Mutators

### Dependencies

[](#dependencies)

- `DB`

### Requirements

[](#requirements)

- PHP 5.4.0

### Upcoming Features

[](#upcoming-features)

- Polymorphic relations
- Refactored lazy/eager loading of relations

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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 ~10 days

Total

5

Last Release

4463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fde949ba5bf8f6af95b77cf88fe1362c4cc7519edbcd4f8891f1564da621fdb?d=identicon)[milesj](/maintainers/milesj)

---

Top Contributors

[![milesj](https://avatars.githubusercontent.com/u/143744?v=4)](https://github.com/milesj "milesj (50 commits)")

---

Tags

validationormmodelrecordtitonactiverelation

### Embed Badge

![Health badge](/badges/titon-model/health.svg)

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

###  Alternatives

[dcat/laravel-wherehasin

Laravel ORM whereHasIn

247149.8k4](/packages/dcat-laravel-wherehasin)[ymigval/laravel-model-cache

Laravel package for caching Eloquent model queries

7642.2k3](/packages/ymigval-laravel-model-cache)[bephp/activerecord

micro activerecord library in PHP(only 400 lines with comments), support chain calls and relations(HAS\_ONE, HAS\_MANY, BELONGS\_TO).

1202.1k2](/packages/bephp-activerecord)[flightphp/active-record

Micro Active Record library in PHP, support chain calls, events, and relations.

163.0k](/packages/flightphp-active-record)

PHPackages © 2026

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