opeyemiabiodun / potato-orm
A simple PHP ORM.
dev-master
2016-01-11 05:34 UTC
Requires
- php: >=5.6.0
- phpunit/dbunit: ^2.0
- vlucas/phpdotenv: 2.*
Requires (Dev)
- phpunit/phpunit: 5.*
This package is not auto-updated.
Last update: 2024-12-17 05:56:49 UTC
README
CheckPoint 2 - Potato ORM
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.
Install
Via Composer
$ composer require opeyemiabiodun/potato-orm
Usage
#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();
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email opeyemi.ogunjimi@andela.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.