spatie / laravel-comments-app

An application for testing out laravel-comments
https://laravel-comments.com
5 stars 2 forks source link

Problem with removing the package #3

Closed core45 closed 1 year ago

core45 commented 2 years ago

When I remove this:

"spatie/laravel-comments": "^1.1",
 "spatie/laravel-comments-livewire": "^1.2",

from the composer.json file and do composer update after the procedure it shows me this error:

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Class "Spatie\Comments\Notifications\PendingCommentNotification" not found

  at app/Providers/AppServiceProvider.php:29
     25▕      * @return void
     26▕      */
     27▕     public function boot()
     28▕     {
  ➜  29▕         PendingCommentNotification::sendTo(function(Comment $comment) {
     30▕             return User::getStaff();
     31▕         });
     32▕ 
     33▕     }

      +7 vendor frames 
  8   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(App\Providers\AppServiceProvider))

      +5 vendor frames 
  14  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
core45 commented 1 year ago

Dear Spatie. I am a paying customer. Would you be that kind and address my problem?

BenQoder commented 1 year ago

You have to remove the notification class and functions from your service provider.

core45 commented 1 year ago

Thank you