mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-26 00:51:26 -05:00
Only use laravel newsletter for subscriptions when the MAILCHIMP variables are filled out
This commit is contained in:
parent
12cbe5c404
commit
e89191027b
1 changed files with 8 additions and 6 deletions
|
@ -20,12 +20,14 @@ class SubscriptionController extends Controller {
|
||||||
$email = $request['email'];
|
$email = $request['email'];
|
||||||
$address = $request['address'];
|
$address = $request['address'];
|
||||||
|
|
||||||
// Submit the subscription request
|
if (env('MAILCHIMP_APIKEY', '') != '' && env('MAILCHIMP_LISTID', '') != '') {
|
||||||
Newsletter::subscribe($email, [
|
// Submit the subscription request
|
||||||
'FNAME' => $fname,
|
Newsletter::subscribe($email, [
|
||||||
'LNAME' => $lname,
|
'FNAME' => $fname,
|
||||||
'ADDRESS' => $address
|
'LNAME' => $lname,
|
||||||
]);
|
'ADDRESS' => $address
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// Save to the database on success
|
// Save to the database on success
|
||||||
$subscriptions = new Subscriptions;
|
$subscriptions = new Subscriptions;
|
||||||
|
|
Loading…
Reference in a new issue