A Simple PHP ORM (Object Relational Mapper). PSR-2 coding standard was adopted in writing the package. The PSR-4 autoloading convention was also adopted.
Via Composer
$ composer require opeyemiabiodun/potato-orm
#Create a record in the database
$user = new User();
$user->name = "Tayo";
$user->address = "54, Kilani street, Akarigbo, Jiyanland.";
$user->phone = "07834531265";
$user->save();
#Find a record from the database
$user = User::find($id);
#Update a record
$user = User::find($id);
$user->address = "No. 1 Update grove, off The Past Street, Now Savedland.";
$user->save();
#Delete a record -- returns a boolean
$result = User::destroy($id):
#Find all users in the database - Returns object array
$users = User::getAll();
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email opeyemi.ogunjimi@andela.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.