Skip to content

Instantly share code, notes, and snippets.

@Johnathan
Created September 14, 2012 19:21
Show Gist options
  • Select an option

  • Save Johnathan/3724111 to your computer and use it in GitHub Desktop.

Select an option

Save Johnathan/3724111 to your computer and use it in GitHub Desktop.
if ( $validation->passes() )
{
$user = new User;
$user->first_name = $user_data['first_name'];
$user->surname= $user_data['surname'];
$user->email = $user_data['email'];
$user->password = Hash::make( $user_data['password'] );
$user->active = 1;
$user->save();
$this->response['user'] = $user->to_array();
return Response::json( $this->response, 201 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment