spatie / laravel-webhook-client

Receive webhooks in Laravel apps
https://freek.dev/1383-sending-and-receiving-webhooks-in-laravel-apps
MIT License
1k stars 147 forks source link

Couldn't install #168

Closed Kodekloner closed 1 year ago

Kodekloner commented 1 year ago

Error

Call to undefined method Illuminate\Foundation\Application::scoped()

at 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))