Oh for the love of god.
Config file: 'id' => env('MAILCHIMP_LIST_ID'),
.env file: MAILCHIMP_LISTID=5b9cd49d8a
List_ID, not ListID.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
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 package which looked to be not only the perfection solution, but also extremely easy to implement (or so I thought).
"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? :)
Oh for the love of god.
Config file: 'id' => env('MAILCHIMP_LIST_ID'),
.env file: MAILCHIMP_LISTID=5b9cd49d8a
List_ID, not ListID.
Please or to participate in this conversation.