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

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

wilson/potato-orm
=================

A simple PHP agnostic ORM

1148PHP

Since Jan 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/andela-womokoro/potato-orm)[ Packagist](https://packagist.org/packages/wilson/potato-orm)[ RSS](/packages/wilson-potato-orm/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Potato-orm
==========

[](#potato-orm)

[![Build Status](https://camo.githubusercontent.com/8f6eddba4b9ebf7e27b7684251464ce0bcf4780b129e189e0cf1c22fe1c24bd3/68747470733a2f2f7472617669732d63692e6f72672f616e64656c612d776f6d6f6b6f726f2f706f7461746f2d6f726d2e737667)](https://travis-ci.org/andela-womokoro/potato-orm)

A simple ORM to insert, read, update, and delete data from a database written in PHP.

Install
-------

[](#install)

Via Composer

```
$ composer require Wilson/potato-orm
```

Usage
-----

[](#usage)

- Simply extend the base class. The base class is an abstract class called "Base". So for example if you have a users table in the database and you wish to perform create, read, update, and delete (CRUD) operations on the table, create a corresponding class like this

```
use Wilson\Source\Base;

class User extends Base
{

}

```

- Insert a record into the table

```
$person = new User();
$person->name = "Wilson Omokoro";
$person->email = "wilson.omokoro@andela.com";
$person->password = "12345";
$person->save();

```

- Find a particular record in the table

```
$user = User::find(3);
echo $user->result;

```

- Read all records from the table

```
$users = User::getAll();
print_r($users);

```

- Update a record in the table. For example update the password of the fifth record in the users table:

```
$user = User::find(5);
$user->password = "lkHJu9Z";
$user->save();

```

- Delete a record from the table. For example delete the third record in the users table:

```
$user = User::destroy(3);

```

Testing
-------

[](#testing)

If the folder containing your test classes is "tests"

```
$ phpunit tests

```

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

[](#change-log)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

Potato-orm is maintained by Wilson Omokoro.

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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/f588bc98eb99d3574ab04692cc6d9238e1f2c43aa67856a6791f606d57e2d386?d=identicon)[wil](/maintainers/wil)

---

Top Contributors

[![wilmkr](https://avatars.githubusercontent.com/u/13233311?v=4)](https://github.com/wilmkr "wilmkr (35 commits)")[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (24 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (10 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (4 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![alexbilbie](https://avatars.githubusercontent.com/u/77991?v=4)](https://github.com/alexbilbie "alexbilbie (2 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (2 commits)")[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (2 commits)")[![mAAdhaTTah](https://avatars.githubusercontent.com/u/4371429?v=4)](https://github.com/mAAdhaTTah "mAAdhaTTah (2 commits)")[![grrnikos](https://avatars.githubusercontent.com/u/3323561?v=4)](https://github.com/grrnikos "grrnikos (1 commits)")[![DaSourcerer](https://avatars.githubusercontent.com/u/1443215?v=4)](https://github.com/DaSourcerer "DaSourcerer (1 commits)")[![Jeroen-G](https://avatars.githubusercontent.com/u/1116853?v=4)](https://github.com/Jeroen-G "Jeroen-G (1 commits)")[![josevieirame](https://avatars.githubusercontent.com/u/1133889?v=4)](https://github.com/josevieirame "josevieirame (1 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")[![zackkitzmiller](https://avatars.githubusercontent.com/u/111536?v=4)](https://github.com/zackkitzmiller "zackkitzmiller (1 commits)")

### Embed Badge

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

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

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