public static function upsert($data) { return \DB::collection('users')->where('email', $data['email'])->update($data, array('upsert' => true)); }