I'm using amazing orm "RedbeanPhp" from http://redbeanphp.com/, I like how it speeds up the development so much, but the documentation is a bit outdated.
- How can I select a few properties when using
R::findAll()
?
For example I only want to select id, email from users, this will grap all the users columns, but I only need 2 columns.
- Is it possible to hide certain columns by default inside bean? "hide password inside users for example"?
To solve this I currently use a bit verbose code:
$users = R::findAll('users')->export();
foreach($users as $user){
unset($user->password, $user->token);//...etc
}
print_r($users);
But it would be nice if could set this inside a fuse model or something?!