spatie / laravel-newsletter

Manage Mailcoach and MailChimp newsletters in Laravel
https://freek.dev/440-easily-integrate-mailchimp-in-laravel-5
MIT License
1.61k stars 235 forks source link

Class "api" not found #303

Closed TasneemWahdan closed 1 year ago

TasneemWahdan commented 1 year ago

After upgrade from laravel 8 laravel-newsletter is not working anymore. I always get this error: Class "api" not found

Braunson commented 1 year ago

You need to update your config, v5 now uses Drivers. See https://github.com/spatie/laravel-newsletter/blob/main/config/newsletter.php#L10

TasneemWahdan commented 1 year ago

Thanks Barunson, I used this package on old versions and all I needed to do to make it work with laravel10 was:

  1. change driver in newsletter.php to be : 'driver' => env('NEWSLETTER_DRIVER', Spatie\Newsletter\Drivers\MailChimpDriver::class),
  2. run: composer require drewm/mailchimp-api