gingteam/redbean

Extra RedBean ORM

v0.0.4 2021-11-12 02:55 UTC

This package is auto-updated.

Last update: 2024-11-12 09:34:35 UTC


README

Build Status phpstan test

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:

https://www.redbeanphp.com/