PHP code example of renatoxm / laravel-vonage-dlr-webhooks

1. Go to this page and download the library: Download renatoxm/laravel-vonage-dlr-webhooks 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/ */

    

renatoxm / laravel-vonage-dlr-webhooks example snippets


/**
 * The event listener mappings for the application.
 *
 * @var array
 */
protected $listen = [
    LaravelVonageDlrWebhooksCalled::class => [
        YourListener::class,
    ],
];



namespace App\Listeners;

use Renatoxm\LaravelVonageDlrWebhooks\Events\LaravelVonageDlrWebhooksCalled;

class YourListener
{
    /**
     * Handle the event.
     *
     * @param  \Renatoxm\LaravelVonageDlrWebhooks\Events\LaravelVonageDlrWebhooksCalled  $event
     * @return void
     */
    public function handle(LaravelVonageDlrWebhooksCalled $event)
    {
        // Do your work here.
        // $event->err_code
        // $event->message_id
        // $event->msisdn
        // ...
    }
}


'log' => [
    ...
    'except' => [
        'open',
        ...
    ],
],
bash
php artisan vendor:publish --provider="Renatoxm\LaravelVonageDlrWebhooks\LaravelVonageDlrWebhooksServiceProvider"
bash
php artisan migrate
bash
php artisan vendor:publish --provider="Renatoxm\LaravelVonageDlrWebhooks\LaravelVonageDlrWebhooksServiceProvider" --tag="config"