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

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

kola/potato-orm
===============

This is an ORM package that manages the persistence of database CRUD operations.

11351PHP

Since Nov 6Pushed 10y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

potato-orm
==========

[](#potato-orm)

[![Build Status](https://camo.githubusercontent.com/4e40e0090ad6c46a6093cde12f751e1eca72a6d7222617f3a8540eb2bc9ab05f/68747470733a2f2f7472617669732d63692e6f72672f616e64656c612d6b6572696e6f736f2f706f7461746f2d6f726d2e737667)](https://travis-ci.org/andela-kerinoso/potato-orm)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/393d00056204fc6ff075ca5a3ed756067fcbce37bb4a83c45714064264c61742/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6c612f706f7461746f2d6f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kola/potato-orm)[![Total Downloads](https://camo.githubusercontent.com/96dab7a5021a38739dad7e69db08b6cd00a234d96d6a69002868e93e3eb05aac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f6c612f706f7461746f2d6f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kola/potato-orm)

This is an ORM package that manages the persistence of simple database CRUD operations.

Installation
------------

[](#installation)

[PHP](https://php.net) 5.5+ and [Composer](https://getcomposer.org) are required.

Via Composer

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

```
$ composer install
```

Usage
-----

[](#usage)

Create a class with the name of the corresponding table in the database. Extend the class to the base class `Model` under the namespace `Kola\PotatoOrm`.

For instance, a class for `dogs` or `Dogs` or `dog` or `Dog` table should look like this:

```
namespace Kola\PotatoOrm;

class Dog extends Model
{
}
```

- Create and save a record to database

```
$dog = new Dog();
$dog->name = "Rex";
$dog->breed= "Alsatian";
$dog->origin = "Germany";
$dog->save();
```

- Find and update a record in database

```
$dog = Dog::find(4);
$dog->name = "Bruno";
$dog->save();
```

OR

```
$dog = Dog::where('name', 'Rex');
$dog->breed = "Rottweiler";
$dog->save();
```

- Delete a record

```
$dog = Dog::destroy(2);
```

Feel free to name the class as the singular of the name of the database table. For instance, `User` class for `users` table.

`Note: Plurals of irregular nouns are not supported`

For instance, a class `Fish` should map to a table `fish` or `fishs`, not `fishes`. And a class `Child` should map to a table `child` or `childs`, not `children`.

Supported database
------------------

[](#supported-database)

Currently, only MYSQL and PostgreSQL are supported.

Work towards the support for other popular databases is in progress.

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

[](#change-log)

Please check out [CHANGELOG](CHANGELOG.md) file for information on what has changed recently.

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit test
```

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

[](#contributing)

Please check out [CONTRIBUTING](CONTRIBUTING.md) file for detailed contribution guidelines.

Credits
-------

[](#credits)

potato-orm is maintained by `Kolawole ERINOSO`.

License
-------

[](#license)

potato-orm is released under the MIT Licence. See the bundled [LICENSE](LICENSE.md) file for details.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/dd5d4a13f965faa93144ed565b96b626e6816f5bcee12d0139a0148d98d1a3cf?d=identicon)[kola.erinoso](/maintainers/kola.erinoso)

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

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

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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