Webhooks
Using Jobs to Handle Webhook Requests
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use R4nkt\LaravelWebhooks\R4nktWebhookCall;
class HandleBadgeEarnedCheck implements ShouldQueue
{
use InteractsWithQueue, Queueable, SerializesModels;
/** @var \R4nkt\LaravelWebhooks\R4nktWebhookCall */
public $webhookCall;
public function __construct(R4nktWebhookCall $webhookCall)
{
$this->webhookCall = $webhookCall;
}
public function handle()
{
// do your work here
// you can access the payload of the webhook call with $this->webhookCall->payload
}
}Using Event Listeners to Handle Webhook Requests
Using the Webhook Call Object
Last updated