gabordemooij/redbean

Unescaped \ on docs website

benmajor opened this issue · 2 comments

There appears to be an unescaped \ character in the documentation regarding the new TypedModel. I think the snippet should be as follows:

define( 'REDBEAN_MODEL_PREFIX', '\\' ); // notice escaping of the backslash here
R::setup();
class Book extends \RedBeanPHP\TypedModel { }
$book = R::dispense('book');
$book = Book::cast($book);
var_dump( $book ); //and you'll see Book...

Ha, very good find! Thanks, will update asap!

No problem at all! By the way, this is one of the best additions to RB in my opinion, so thank you for your hard work on this.