1. Go to this page and download the library: Download zeevx/laravel-bachs library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Illuminate\Support\Facades\Event;
use App\Listeners\ProcessBachsWebhook;
use Zeevx\LaravelBachs\Events\WebhookReceived;
Event::listen(WebhookReceived::class, ProcessBachsWebhook::class);
use Illuminate\Contracts\Queue\ShouldQueue;
use Zeevx\LaravelBachs\Events\WebhookReceived;
final class ProcessBachsWebhook implements ShouldQueue
{
public function handle(WebhookReceived $received): void
{
$event = $received->event;
$event->id;
$event->type;
$event->data;
$event->payload;
}
}
use Illuminate\Support\Facades\Event;
use Zeevx\LaravelBachs\Events\WebhookReceived;
Event::fake([WebhookReceived::class]);
text
POST /bachs/webhook
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.