2017 © Pedro Peláez
 

library potato

Potato ORM is a simple agnostic ORM that can perform the basic crud database operations

image

florence/potato

Potato ORM is a simple agnostic ORM that can perform the basic crud database operations

  • Tuesday, July 18, 2017
  • by florenxe
  • Repository
  • 1 Watchers
  • 3 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status , (*1)

Potato ORM

Potato ORM is a simple and very basic ORM that can perform the basic crud database operations., (*2)

Installation

Require via composer:, (*3)

    composer require florence/potato

Usage

  • make sure to establish a connection to your database
  • create your database tables using pluralized names e.g users, cars.
  • define the table schema e.g users table schema could look like :point_right: [username, email, password, phone]
  • when the above is set, you can start using potatoORM

Example

  • create a model, (*4)

    class User extends Model
    {
        // add methods that are not available in parent class
    }
  • create a new instance of the model you created, (*5)

    $user = new User();
  • add the respective column names and assign values, (*6)

    $user->username = "johndoe";
    $user->email = "john@doe.com";
    $user->phone = "08067890986";
  • save, (*7)

    $user->save();
  • fetch all users, (*8)

    $user = User::getAll();
  • find one user, (*9)

    $user = User::find(1);
  • delete one user, (*10)

    $user = User::destroy(1);
  • update user record, (*11)

    &user = User::find(3);
    $user->username = "Lindsay";
    $user->email = "lindsay@africa.com";
    $user->save();     

Potato ORM is an open-source project and still pretty much work in progress. It does not handle table relationships as at this version and can only carry out simple crud operations. Please feel free to contribute to make this as awesome as it can get., (*12)

Happy Coding!, (*13)

The Versions

18/07 2017

dev-master

9999999-dev

Potato ORM is a simple agnostic ORM that can perform the basic crud database operations

  Sources   Download

MIT

The Requires

 

The Development Requires

by andela-fokosun