CraigDaviess

Experience

60

0 Best Reply Awards

  • Member Since 4 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

16th May, 2018

CraigDaviess left a reply on Unable To Use Spatie/laravel-newsletter • 4 months ago

Oh for the love of god.

Config file: 'id' => env('MAILCHIMP_LIST_ID'),

.env file: MAILCHIMP_LISTID=5b9cd49d8a

List_ID, not ListID.

CraigDaviess started a new conversation Unable To Use Spatie/laravel-newsletter • 4 months ago

I'm looking to integrate Mailchimp into my application and allow my customers to subscribe for the mailing list. I came across the spatie/laravel-newsletter which looked to be not only the perfection solution but also extremely east to implement (or so I thought).

  1. I used composer to require the package and also published the config file.
  2. I have a basic HTML form that passes information to my pages controller file.
  3. When I try to test the feature, I get a vendor related error:

"Type error: Return value of Spatie\Newsletter\NewsletterList::getId() must be of the type string, null returned"

It's complaining about a specific part in the following file:

\vendor\spatie\laravel-newsletter\src\NewsletterList.php

public function getId(): string { return $this->properties['id']; }

I've tried updating composer but there's nothing to update or install. The package is meant to have very little installation steps so I really have no idea where to go from here.

Hopefully someone can point me in the right direction? :)

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.