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

Spatie\WebhookClient\ProcessWebhookJob not found #109

Closed arnedeutscher closed 3 years ago

arnedeutscher commented 3 years ago

I´ve got the error message Class \"Spatie\WebhookClient\ProcessWebhookJob\" not found at ...\app\Handler\WebhookHandler.php:7.

WebhookHandler.php

<?php

namespace App\Handler;

use Spatie\WebhookClient\Jobs\ProcessWebhookJob;

class WebhookHandler extends ProcessWebhookJob
{
    public function handle()
    {
        //...
    }
}

How you can see, I´ve changed the path to Spatie\WebhookClient\Jobs\ProcessWebhookJob, because that is where the file is actually located. (https://github.com/spatie/laravel-webhook-client/tree/main/src/Jobs)

Description from the documentation: "A valid job is any class that extends Spatie\WebhookClient\ProcessWebhookJob and has a handle method."

Maybe it should be changed in the documentation.

And thank you for this package!

arnedeutscher commented 3 years ago

Did I say something wrong?

freekmurze commented 3 years ago

O, I accidentally closed this issue. Feel free to send a PR to correct the docs and afterwards close this issue.

arnedeutscher commented 3 years ago

PR is out