Skip to content

Instantly share code, notes, and snippets.

@mgcrea
Created May 24, 2012 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgcrea/2780710 to your computer and use it in GitHub Desktop.
Save mgcrea/2780710 to your computer and use it in GitHub Desktop.
$admins = Users::all(array('conditions' => array('email' => array('$in' => array('a@gmail.com', 'b@gmail.com'))), 'fields' => array('_id', 'email', 'isAdmin')));
d($admins->data());
$admins->each(function($admin) {
$admin->isAdmin = true;
$admin->save();
});
dd($admins->data());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment