Download the PHP package zapply/zapply-laravel without Composer
On this page you can find all versions of the php package zapply/zapply-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package zapply-laravel
Zapply for Laravel
Getting Started
First install Zapply for Laravel via the Composer package manager:
Next, you must load the service provider:
Next, you should configure your application's .env file:
Finally, you may use the Resend facade to access Zapply API: `
Sending via Laravel Notifications
In every model you wish to be notifiable via WhatsApp, you must add a number property to that model accessible through a routeNotificationForZapply method:
The number should be in format: Country Code + Area Code + Phone Number, for example: 552199999999.
You may now tell Laravel to send notifications to WhatsApp in the via method:
Available Message Types
Handling Webhooks
Zapply can notify your application of a variety of events via webhooks. By default, a route that points to Zapply's webhook controller is automatically registered by the Zapply service provider. This controller will handle all incoming webhook requests.
Webhooks and CSRF Protection
Since Zapply webhooks need to bypass Laravel's CSRF protection, be sure to list the URI as an exception in your application's App\Http\Middleware\VerifyCsrfToken middleware or list the route outside of the web middleware group:
Defining Webhook Event Handlers
You may handle webhhok events by listening to the following events that are dispatched:
- Zapply\Laravel\Events\WebhookReceived
- Zapply\Laravel\Events\WebhookHandled
Both events contain the full payload of Zapply webhook. For example, if you wish to handle the message webhook, you may register a listener that will handle the event:
Verifying Webhook Signatures
To secure your webhooks, you may use Zapply's webhook signatures. For convenience, we already included a middleware which validates that the incoming webhook request is valid.
To enable webhook verification, ensure that the ZAPPLY_WEBHOOK_SIGNATURE
environment variable is set in your application's .env file. The webhook secret may be retrieved from your Zapply account dashboard.
All versions of zapply-laravel with dependencies
illuminate/console Version ^10.0|^11.0
illuminate/contracts Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/log Version ^10.0|^11.0
illuminate/notifications Version ^10.0|^11.0
illuminate/pagination Version ^10.0|^11.0
illuminate/routing Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/view Version ^10.0|^11.0
zapply/zapply-php Version ^1.0
symfony/http-kernel Version ^6.0|^7.0
symfony/polyfill-intl-icu Version ^1.22.1