RedBeanPHP is an easy-to-use, on-the-fly ORM for PHP. It's 'zero config', relying on strict conventions instead. Let's look at the code, this is how you do CRUD in RedBeanPHP:
$post = R::dispense('post');
$post->text = 'Hello World';
$id = R::store($post); //Create or Update
$post = R::load('post',$id); //Retrieve
This automatically generates the database, tables and columns... on-the-fly. It infers relations based on naming conventions. Download RedBeanPHP Now. RedBeanPHP is written by BDFL Gabor de Mooij and the RedBeanPHP community.
: RedBeanPHP 4.0.7 and 3.5.11 (includes a workaround for a bug in PDO SQLITE in PHP 5.3)
: RedBeanPHP 4.0.6 and 3.5.10 minor PDO improvement.
: RedBeanPHP 4.0.5 improved UUID/GUID support.
: Restructuring documentation
: RedBeanPHP 4.0.4 has been released (see below).
: Backport via-cache fix to 3.5.9
: RedBeanPHP 4.0.3 fixed issue with Via Cache.
: RedBeanPHP 4.0.2 fixed issue with nullifying parent bean.
: RedBeanPHP 4.0.1 link() now also accept camelcase type (converts to snake_case).
: RedBeanPHP 3.5 update 8 has been released, this is a maintenance update.
: We are proud to announce the official release of RedBeanPHP 4.0, right on time! (as always).
No need to configure anything. No annotations or lengthy XML files.
Just follow the conventions and everything works.
Installation is also easy, just one file! No autoloaders, package management or include paths. RedBeanPHP also automatically configures your database connection to use UTF-8 encoding.
RedBeanPHP will adapt the database schema to fit your needs. It will
create the tables and columns you need and change those columns if necessary.
During development, this will give you the 'NoSQL' experience. However, when you deploy on a production server you can freeze the schema and benefit from performance gains and referential integrity. RedBeanPHP combines the best of both worlds: the comfort of NoSQL and the reliability of relational database systems.
Although RedBeanPHP is a compact library, it's packed with powerful features. FUSE allows you to add model classes for records ad-hoc, as soon as RedBeanPHP discovers the presence of a domain model it will start using it. The duplicate method can create deep copies of any object structure in the database. The Dispense method can process entire arrays and convert them to object hierarchies. This is just a sample of all those powerful features offered by RedBeanPHP.
Download the easy-to-use one-in-all package, one single file containing the entire RedBeanPHP library! No composer, no auto-loaders, no configuration, just download and run! Go to the download page and download to latest version of RedBeanPHP!
RedBeanPHP is a zero config, fire-and-forget ORM library,
which is pretty fun, but it enforces strict database conventions.
The best way to use RedBeanPHP is to start with an empty database and let RedBeanPHP build the schema for
Don't try to shoehorn RedBeanPHP into existing projects with custom schemas.
Not sure if RedBeanPHP is the way to go ? Take a look at our checklist!
At the moment, I am busy restructuring and improving the documentation. To improve this manual I might move some chapters around and reorganize some of the information. Sorry for the inconvenience.