Download the PHP package sendkuy/laravel without Composer

On this page you can find all versions of the php package sendkuy/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel

SendKuy for Laravel

SendKuy for Laravel

WhatsApp, SMS and email notifications for Laravel, a facade for the whole SendKuy API, and signed webhooks that arrive as Laravel events.

Latest version Downloads CI

Baca dalam Bahasa Indonesia

Install

Laravel 12 or 13, PHP 8.2 or newer. Add your key to .env:

Send from anywhere

Prefer injection? Type-hint SendKuy\SendKuy and Laravel hands you the same configured client. Every endpoint of the API has a method; see the PHP SDK for the full list, errors and pagination.

Notifications

Tell the channel where to send by adding a method to your notifiable model:

Or send without a model:

Builder Sets
SendKuyMessage::whatsapp($body), ::sms($body), ::email($subject, $body) the channel and the text
->template($id, $parameters) a WhatsApp template
->media($url, $type, $filename) one WhatsApp attachment: image, video, audio or document
->attach($url, $filename) an email attachment, up to ten
->gateway($id) the exact sender to use
->scheduleAt($dateTime) send later

A retried queued notification is never sent twice

When a notification implements ShouldQueue, Laravel retries its job if a worker dies or the job times out. The channel derives the idempotency key from Laravel's notification id, which stays the same across every retry of that job, so SendKuy answers a retry with the first result instead of sending the message again.

Keep toSendKuy() deterministic for this to hold: build the message from the notification's own data, not from now() or other values that change between runs. A retry that produces a different payload under the same key is refused with 409 idempotency_key_reused, so the job fails instead of sending twice. To schedule, store the time on the notification when you create it and pass that to scheduleAt().

The channel returns the created messages, so a NotificationSent listener can store their ids from $event->response.

Webhooks

The package registers POST /sendkuy/webhook, outside the web middleware group so CSRF does not apply. Point a webhook at it in your SendKuy dashboard and store the secret:

Every delivery with a valid signature becomes a SendKuy\Laravel\Events\WebhookReceived event; anything else is refused with 403. If SENDKUY_WEBHOOK_SECRET is not set, the route answers 500 and logs an error, so the problem shows up in your SendKuy delivery history instead of passing silently.

$event->id stays the same across SendKuy's retries of one delivery: use it to skip duplicates. Queue the listener so the route answers within SendKuy's 10-second timeout. New event types reach your listener without a package update.

Configuration

Key Env Default
api_key SENDKUY_API_KEY none
base_url SENDKUY_BASE_URL https://app.sendkuy.com/api/v1
timeout SENDKUY_TIMEOUT 30 seconds
max_retries SENDKUY_MAX_RETRIES 2
webhook.secret SENDKUY_WEBHOOK_SECRET none
webhook.path SENDKUY_WEBHOOK_PATH sendkuy/webhook; set it to an empty value to turn the route off
webhook.tolerance SENDKUY_WEBHOOK_TOLERANCE 300 seconds

Testing

Notification::fake() works as usual. To fake the client itself, bind your own instance:

Links

License

MIT. See LICENSE.


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/http Version ^12.0|^13.0
illuminate/notifications Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
sendkuy/sdk Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sendkuy/laravel contains the following files

Loading the files please wait ...