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

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

sirolad/potato-orm
==================

A basic CRUD Object Relational Mapper

26PHP

Since Nov 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sirolad/potatoORM)[ Packagist](https://packagist.org/packages/sirolad/potato-orm)[ RSS](/packages/sirolad-potato-orm/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PotatoORM
=========

[](#potatoorm)

[![License](https://camo.githubusercontent.com/e498eead712d82d9ee1af0a4850acd2e46ea48c48fb9ce5a3d2ab64f28f95b34/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](https://github.com/andela-sakande/PotatoORM/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/7f10360919e29b65a127a74c4b9f65daee4edee499841027f87a2e96b14d4865/68747470733a2f2f7472617669732d63692e6f72672f616e64656c612d73616b616e64652f706f7461746f4f524d2e737667)](https://travis-ci.org/andela-sakande/potatoORM)[![Quality Score](https://camo.githubusercontent.com/f4533f8b002f1e7d591e20b4efe7048c52575aa5cc7ed6a92fe4373e6fde237a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f616e64656c612d73616b616e64652f506f7461746f4f524d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/andela-sakande/PotatoORM)

This package performs basic CRUD operation using Object Relational Mapping(ORM) :

DIRECTORY STRUCTURE
-------------------

[](#directory-structure)

```
src/           core package code
   |DB         database connection class
   |Entities   samples class to test the model class
   |Exceptions custom exception classes
   |Libraries  helper classes
tests/         tests of the core package

```

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

[](#installation)

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

Via Composer

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

or

```
"require": {
        "sirolad/potato-orm": "dev-master"
    }
```

Usage
-----

[](#usage)

Extend `Potato` class like so

```
    class Goat extends Potato
    {
    }
```

The following method can be used to access the classes

getAll
------

[](#getall)

```
   $goat = Goat::getAll();
   print_r($goat);
```

This should print out all the ​goats ​in the ​goats ​table of Goat class.

find
----

[](#find)

```
    $goat = Goat::find(1);
    $goat->password = "ewure";
    echo $goat->save();
```

This should find the ​goat ​with `id=1` in the goats table and change the password to `ewure`.

save
----

[](#save)

```
    $goat = new Goat();
    $goat->name = "billy";
    $goat->age  = 25;
    $goat->job  = "developer";
    $goat->save();
```

This should insert a record for goat `billy` in the goats table.

Update
------

[](#update)

```
    $goat = Goat::where('name', 'JackBauer');
    $goat->password = "wetina";
    $goat->save();
```

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

[](#change-log)

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

Testing
-------

[](#testing)

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

```
$ composer test

```

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

[](#contributing)

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

Credits
-------

[](#credits)

PotatoORM is developed and maintained by `Surajudeen Akande`.

License
-------

[](#license)

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

Supported Databases
-------------------

[](#supported-databases)

```
MySQL
PGSQL
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sirolad-potato-orm/health.svg)](https://phpackages.com/packages/sirolad-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)
