RedBeanPHP is an easy-to-use, on-the-fly ORM for PHP. It is zero config, relying on strict conventions instead. Let's look at the code, this is how you do CRUD in RedBeanPHP:
//don't be afraid of the phar, just include it like a normal .php
$post = R::dispense('post');
$post->text = 'Hello World';
$id = R::store($post); //Create or Update
$post = R::load('post',$id); //Retrieve
RedBeanPHP automatically generates the database, tables and columns on-the-fly. RedBeanPHP infers relations based on naming conventions. Download RedBeanPHP Now
Composer is no longer supported by RedBeanPHP, read why...
: 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).
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!
Download the latest version of RedBeanPHP: RedBeanPHP 4.0.1 (requires PHP 5.3.4+).
Or download the 3.X LTS edition: RedBeanPHP 3.5.8.
Some IDEs have trouble scanning PHAR files. IDE companies are working to resolve these issues, meanwhile if you experience any issues, download the IDE support file to improve auto-complete functionality in your code editor.
RedBeanPHP is zero config, fire-and-forget 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!