PHPackages                             velt/orm - 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. velt/orm

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

velt/orm
========

Active record ORM layer for the Velt framework.

v0.1.0(yesterday)04↑2900%1MITPHPPHP ^8.2

Since Jun 18Pushed yesterdayCompare

[ Source](https://github.com/Velt-PHP/veltphp-orm)[ Packagist](https://packagist.org/packages/velt/orm)[ RSS](/packages/velt-orm/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Velt ORM
========

[](#velt-orm)

Active record ORM, relations and model layer for the Velt PHP framework.

Role
----

[](#role)

This package starts in Module 3. It builds on `veltphp/database` and exposes the expressive model API used by applications:

```
User::find(1);
User::where('email', $email)->first();
$user->save();
```

Scope
-----

[](#scope)

- Active record base model.
- Object hydration and persistence.
- Minimal mass assignment protection.
- Relations such as `hasMany` and `belongsTo`.
- Pagination result objects.

Boundaries
----------

[](#boundaries)

- SQL primitives, query builder, schema builder, migrations and seeders start in `veltphp/database`.
- CLI commands for migrations and seeders live in `veltphp/cli`.
- Package assembly and compatibility documentation live in `veltphp/framework`.

Module 3 Issues
---------------

[](#module-3-issues)

- Issue 01: create the active model layer.
- Issue 02: add relations and pagination.

Current API
-----------

[](#current-api)

```
use Velt\Orm\Model;

final class User extends Model
{
    protected static string $table = 'users';

    protected static array $fillable = ['name', 'email'];
}

$user = User::find(1);
$user = User::where('email', $email)->first();

$user = new User(['name' => 'Ada', 'email' => 'ada@example.com']);
$user->save();

$user->name = 'Ada Lovelace';
$user->save();

$user->delete();
```

Active Model Features
---------------------

[](#active-model-features)

- Object hydration from database rows.
- `find`, `all`, `where`, `create`.
- Instance `save` for insert/update.
- Instance `delete`.
- Magic attribute access with `$user->name`.
- Minimal mass assignment protection via `$fillable` and `$guarded`.

Relations
---------

[](#relations)

```
final class User extends Model
{
    protected static string $table = 'users';

    public function posts(): array
    {
        return $this->hasMany(Post::class, 'user_id');
    }
}

final class Post extends Model
{
    protected static string $table = 'posts';

    public function user(): ?Model
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
```

Pagination
----------

[](#pagination)

```
$page = User::query()->orderBy('id')->paginate(page: 1, perPage: 15);

$page->toArray();
```

Serialized shape:

```
[
    'data' => [...],
    'page' => 1,
    'total' => 50,
    'perPage' => 15,
]
```

Testing
-------

[](#testing)

The ORM tests reuse the PHPUnit installation from `velt-database` in this local workspace:

```
..\velt-database\vendor\bin\phpunit.bat --colors=always --testdox
```

The SQLite integration tests require `pdo_sqlite`. If the extension is not installed, those tests are skipped.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 62.5% 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

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/233258904?v=4)[Kaluba sierra](/maintainers/skylore300-hash)[@skylore300-hash](https://github.com/skylore300-hash)

---

Top Contributors

[![Athena-Evan01](https://avatars.githubusercontent.com/u/215157142?v=4)](https://github.com/Athena-Evan01 "Athena-Evan01 (5 commits)")[![skylore300-hash](https://avatars.githubusercontent.com/u/233258904?v=4)](https://github.com/skylore300-hash "skylore300-hash (2 commits)")[![KeranTyrinthe](https://avatars.githubusercontent.com/u/177726053?v=4)](https://github.com/KeranTyrinthe "KeranTyrinthe (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/velt-orm/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[yemenopensource/filament-excel

This package useful for importing excel files into models.

194.2k](/packages/yemenopensource-filament-excel)

PHPackages © 2026

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