gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.3k stars 280 forks source link

Unescaped \ on docs website #902

Closed benmajor closed 2 years ago

benmajor commented 2 years ago

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...
gabordemooij commented 2 years ago

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

benmajor commented 2 years ago

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.