Skip to content

Instantly share code, notes, and snippets.

@jmas
Created January 13, 2014 20:43
Show Gist options
  • Save jmas/8407754 to your computer and use it in GitHub Desktop.
Save jmas/8407754 to your computer and use it in GitHub Desktop.
$data = App::instance()->request->getPost('data');
$model = App::instance()->models->create('User', $data);
if ($model->save()) {
echo 'saved';
} else {
var_dump($model->getError());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment