I am developing a Laravel application which requires paystack for payment processig. When I tried to install spatie/laravel-webhook-client through composer, using composer require spatie/laravel-webhook-client
I got the following error:
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
Error
Call to undefined method Illuminate\Foundation\Application::scoped()
at C:\wamp64-new\www\vendor\spatie\laravel-webhook-client\src\WebhookClientServiceProvider.php:30 26▕ } 27▕ 28▕ Route::macro('webhooks', fn (string $url, string $name = 'default') => Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}")); 29▕ ➜ 30▕ $this->app->scoped(WebhookConfigRepository::class, function () { 31▕ $configRepository = new WebhookConfigRepository(); 32▕ 33▕ collect(config('webhook-client.configs')) 34▕ ->map(fn (array $config) => new WebhookConfig($config))
1
C:\wamp64-new\www\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36 Spatie\WebhookClient\WebhookClientServiceProvider::boot()2
C:\wamp64-new\www\vendor\laravel\framework\src\Illuminate\Container\Util.php:40 Illuminate\Container\BoundMethod::Illuminate\Container{closure}() Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
How can I resolve this?