gingteam / redbean
Extra RedBean ORM
v0.0.4
2021-11-12 02:55 UTC
Requires
- php: >=8.0
- gabordemooij/redbean: ^5.7
Requires (Dev)
- pestphp/pest: ^1.20
- phpstan/phpstan: ^1.0
README
RedBeanPHP is an easy to use ORM tool for PHP.
- Automatically creates tables and columns as you go
- No configuration, just fire and forget
Installation
composer require gingteam/redbean
Quick Example
How we store a book object with RedBeanPHP:
use GingTeam\RedBean\Facade as R; R::setup('sqlite:'.__DIR__.'/data.db'); $book = model('book'); $book->author = 'Santa Claus'; $book->title = 'Secrets of Christmas'; R::store($book); $qb = R::createQueryBuilder(); $data = $qb ->select('*') ->from('book') ->fetch();
Yep, it's that simple.
More information
For more information about RedBeanPHP please consult the RedBeanPHP website: