Creating a new contact record
You can create new \Groundhogg\Contact objects on the fly by passing in an array of parameters. Duplicates will be avoided.
$first_name = $_POST[ 'first' ]; $email = $_POST[ 'email' ]; $contact = new \Groundhogg\Contact( [ 'first_name' => $first_name, 'email' => $email, ] );