Skip to content

dekate/dekasender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dekasender API

Unofficial PHP wrapper for sender.dekacare.id

Table Of Contents

Installation

install the package

composer require dekate/dekasender

Laravel

publish the config file to be used in Laravel project

php artisan vendor:publish --tag=dekasender

add DEKASENDER_API_KEY to your .env

Usage

To use the package, create an instance of either Dekasender/Whatsapp, Dekasender/Sms, or Dekasender/Email depending on your implementation

Ensure the receiver's number is composed solely of digits, begins with a country code, and doesn’t start with 0. It should not contain any symbols, whether they are plus signs, spaces, or dashes.

use Dekasender/Whatsapp;
use Dekasender/Sms;
use Dekasender/Email;

// ...

$whatsappClient = new Whatsapp("MY_API_KEY");
$smsClient = new Whatsapp("MY_API_KEY");
$emailClient = new Whatsapp("MY_API_KEY");

$resultWhatsapp = $whatsappClient->sendMessage('880123456789', 'Hello World!');
$resultSms = $smsClient->sendSms('880123456789', 'Hello World!');
$resultEmail = $emailClient->sendEmail("[email protected]", "Subject", "Message", "sender", "[email protected]")

$resultBody = $result->body;

Laravel Usage

use Dekasender/Facade/Whatsapp;
use Dekasender/Facade/Sms;
use Dekasender/Facade/Email;

// ...

$resultWhatsapp = Whatsapp::sendMessage('880123456789', 'Hello World!');
$resultSms = Sms::sendSms('880123456789', 'Hello World!');
$resultEmail = Email::sendEmail("[email protected]", "Subject", "Message", "sender", "[email protected]")

About

Official php implementation for Dekasender

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages